diff --git a/TODO b/TODO index b9191189f..f88182230 100644 --- a/TODO +++ b/TODO @@ -55,6 +55,8 @@ Also look at all the .c files - they have their own localized TODO lists 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 off alerting users as they learn what it is (over time) * (closing of windows) doesn't always close the window. sometimes it loses diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 8f642f312..ea5ff6680 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -321,8 +321,12 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map) bd->ignore_first_unmap = 2; } - ecore_x_window_save_set_add(win); - ecore_x_window_reparent(win, bd->client.shell_win, 0, 0); + /* just to friggin make java happy - we're DELAYING the reparent until + * 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_show(bd->event_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); if (bd->visible) return; 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); bd->visible = 1; bd->changes.visible = 1; @@ -433,7 +438,8 @@ e_border_hide(E_Border *bd, int manage) if (!bd->visible) 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); if (!bd->iconic) e_hints_window_hidden_set(bd); @@ -2853,7 +2859,6 @@ _e_border_eval(E_Border *bd) } bd->client.mwm.fetch.hints = 0; } - if (bd->changes.shape) { 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) { E_Event_Border_Add *ev; diff --git a/src/bin/e_border.h b/src/bin/e_border.h index a3dfff4ab..3d3fd0158 100644 --- a/src/bin/e_border.h +++ b/src/bin/e_border.h @@ -186,6 +186,7 @@ struct _E_Border unsigned char need_shape_export : 1; unsigned char fullscreen : 1; unsigned char already_unparented : 1; + unsigned char need_reparent : 1; unsigned char changed : 1; diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index 1101a6329..014df53e0 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -19,11 +19,24 @@ e_hints_init(void) Ecore_X_Window win; 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 -// on finding this out when it shoudl be irrelevant! stupid FUCKS. - ecore_x_netwm_wm_identify(roots[i], win, "KWin"); -// ecore_x_netwm_wm_identify(roots[i], win, "Enlightenment"); +/* + * 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 on finding this + * out when it should be irrelevant! stupid code! I can't believe the time we + * 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 */ 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 e_hints_manager_init(E_Manager *man) { 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 */ diff --git a/src/bin/e_hints.h b/src/bin/e_hints.h index f54560203..d94828783 100644 --- a/src/bin/e_hints.h +++ b/src/bin/e_hints.h @@ -7,6 +7,7 @@ #define E_HINTS_H 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_client_list_set(void); EAPI void e_hints_client_stacking_set(void);