stop pretending to be kwin. we can be proud to be e! we pretend to have 16's

e comms stuff though... and defer repaerent until the last moment we can


SVN revision: 14863
This commit is contained in:
Carsten Haitzler 2005-05-20 05:13:45 +00:00
parent 242e7b4744
commit 97bc390d34
5 changed files with 62 additions and 10 deletions

2
TODO
View File

@ -55,6 +55,8 @@ Also look at all the .c files - they have their own localized TODO lists
These are in no particular order: These are in no particular order:
* on restart e always goes back to desktop 0,0 - it shoudl go to the desktop
it was last on (per zone, per container, per manager).
* start module needs to have an way to alert users to "click here" and back * start module needs to have an way to alert users to "click here" and back
off alerting users as they learn what it is (over time) off alerting users as they learn what it is (over time)
* (closing of windows) doesn't always close the window. sometimes it loses * (closing of windows) doesn't always close the window. sometimes it loses

View File

@ -321,8 +321,12 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map)
bd->ignore_first_unmap = 2; bd->ignore_first_unmap = 2;
} }
ecore_x_window_save_set_add(win); /* just to friggin make java happy - we're DELAYING the reparent until
ecore_x_window_reparent(win, bd->client.shell_win, 0, 0); * evail time...
*/
/* ecore_x_window_reparent(win, bd->client.shell_win, 0, 0); */
bd->need_reparent = 1;
ecore_x_window_border_width_set(win, 0); ecore_x_window_border_width_set(win, 0);
ecore_x_window_show(bd->event_win); ecore_x_window_show(bd->event_win);
ecore_x_window_show(bd->client.shell_win); ecore_x_window_show(bd->client.shell_win);
@ -408,7 +412,8 @@ e_border_show(E_Border *bd)
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
if (bd->visible) return; if (bd->visible) return;
e_container_shape_show(bd->shape); e_container_shape_show(bd->shape);
ecore_x_window_show(bd->client.win); if (!bd->need_reparent)
ecore_x_window_show(bd->client.win);
e_hints_window_visible_set(bd); e_hints_window_visible_set(bd);
bd->visible = 1; bd->visible = 1;
bd->changes.visible = 1; bd->changes.visible = 1;
@ -433,7 +438,8 @@ e_border_hide(E_Border *bd, int manage)
if (!bd->visible) return; if (!bd->visible) return;
if (bd->moving) return; if (bd->moving) return;
ecore_x_window_hide(bd->client.win); if (!bd->need_reparent)
ecore_x_window_hide(bd->client.win);
e_container_shape_hide(bd->shape); e_container_shape_hide(bd->shape);
if (!bd->iconic) if (!bd->iconic)
e_hints_window_hidden_set(bd); e_hints_window_hidden_set(bd);
@ -2853,7 +2859,6 @@ _e_border_eval(E_Border *bd)
} }
bd->client.mwm.fetch.hints = 0; bd->client.mwm.fetch.hints = 0;
} }
if (bd->changes.shape) if (bd->changes.shape)
{ {
Ecore_X_Rectangle *rects; Ecore_X_Rectangle *rects;
@ -3029,6 +3034,15 @@ _e_border_eval(E_Border *bd)
} }
} }
if (bd->need_reparent)
{
ecore_x_window_save_set_add(bd->client.win);
ecore_x_window_reparent(bd->client.win, bd->client.shell_win, 0, 0);
if (bd->visible)
ecore_x_window_show(bd->client.win);
bd->need_reparent = 0;
}
if (bd->new_client) if (bd->new_client)
{ {
E_Event_Border_Add *ev; E_Event_Border_Add *ev;

View File

@ -186,6 +186,7 @@ struct _E_Border
unsigned char need_shape_export : 1; unsigned char need_shape_export : 1;
unsigned char fullscreen : 1; unsigned char fullscreen : 1;
unsigned char already_unparented : 1; unsigned char already_unparented : 1;
unsigned char need_reparent : 1;
unsigned char changed : 1; unsigned char changed : 1;

View File

@ -19,11 +19,24 @@ e_hints_init(void)
Ecore_X_Window win; Ecore_X_Window win;
win = ecore_x_window_new(roots[i], -200, -200, 5, 5); win = ecore_x_window_new(roots[i], -200, -200, 5, 5);
// I don't FUCKING believe it. if we PRETENT we are Kwin - java is /*
// happy. why? it expects a double reparenting wm then. java insists * I don't FUCKING believe it. if we PRETENT we are Kwin - java is happy.
// on finding this out when it shoudl be irrelevant! stupid FUCKS. * why? it expects a double reparenting wm then. java insists on finding this
ecore_x_netwm_wm_identify(roots[i], win, "KWin"); * out when it should be irrelevant! stupid code! I can't believe the time we
// ecore_x_netwm_wm_identify(roots[i], win, "Enlightenment"); * just wasted hunting a bug that wasn't and that is due to sheer stupid
* coding.
*/
/* Now for more stupidity... Openoffice.org will change its look and feel
* depending on what wm it thinks there is... so if we pretend to be Kwin...
* it tries to use kde preferences, if found.
*/
/* I have disabled tyhis now by pretending to be E16 with e16 comms. this
* means java plays nice and uses our FRAMe property.. but we had to do other
* evil stuff as java EXPECTS all this at REPARENT time... i've deferred
* reparenting... i hate java!
*/
/* ecore_x_netwm_wm_identify(roots[i], win, "KWin");*/
ecore_x_netwm_wm_identify(roots[i], win, "Enlightenment");
/* Set what hints we support */ /* Set what hints we support */
ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_ACTIVE_WINDOW, 1); ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_ACTIVE_WINDOW, 1);
@ -52,10 +65,31 @@ e_hints_init(void)
} }
} }
/*
* This is here so we don't have to pretend to be Kwin anymore - we pretend
* to do old e16 style ipc. in fact we just ignore it... but set up the
* window port anyway
*/
void
e_hints_e16_comms_pretend(E_Manager *man)
{
Ecore_X_Window win;
Ecore_X_Atom enlightenment_comms, string;
char buf[256];
enlightenment_comms = ecore_x_atom_get("ENLIGHTENMENT_COMMS");
string = ecore_x_atom_get("STRING");
win = ecore_x_window_input_new(man->root, -100, -100, 1, 1);
snprintf(buf, sizeof(buf), "WINID %8x", (int)win);
ecore_x_window_prop_property_set(win, enlightenment_comms, string, 8, buf, 14);
ecore_x_window_prop_property_set(man->root, enlightenment_comms, string, 8, buf, 14);
}
void void
e_hints_manager_init(E_Manager *man) e_hints_manager_init(E_Manager *man)
{ {
ecore_x_netwm_desk_size_set(man->root, man->w, man->h); ecore_x_netwm_desk_size_set(man->root, man->w, man->h);
e_hints_e16_comms_pretend(man);
} }
/* FIXME, this should set the list in map order, not stack order */ /* FIXME, this should set the list in map order, not stack order */

View File

@ -7,6 +7,7 @@
#define E_HINTS_H #define E_HINTS_H
EAPI void e_hints_init(void); EAPI void e_hints_init(void);
EAPI void e_hints_e16_comms_pretend(E_Manager *man);
EAPI void e_hints_manager_init(E_Manager *man); EAPI void e_hints_manager_init(E_Manager *man);
EAPI void e_hints_client_list_set(void); EAPI void e_hints_client_list_set(void);
EAPI void e_hints_client_stacking_set(void); EAPI void e_hints_client_stacking_set(void);