Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c e_border.h e_hints.c e_hints.h
Log Message:
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
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -3 -r1.215 -r1.216
--- e_border.c 19 May 2005 16:16:27 -0000 1.215
+++ e_border.c 20 May 2005 05:13:45 -0000 1.216
@@ -321,8 +321,12 @@
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_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 @@
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 @@
}
bd->client.mwm.fetch.hints = 0;
}
-
if (bd->changes.shape)
{
Ecore_X_Rectangle *rects;
@@ -3029,6 +3034,15 @@
}
}
+ 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;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- e_border.h 17 May 2005 12:33:12 -0000 1.55
+++ e_border.h 20 May 2005 05:13:45 -0000 1.56
@@ -186,6 +186,7 @@
unsigned char need_shape_export : 1;
unsigned char fullscreen : 1;
unsigned char already_unparented : 1;
+ unsigned char need_reparent : 1;
unsigned char changed : 1;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_hints.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- e_hints.c 19 May 2005 04:07:41 -0000 1.29
+++ e_hints.c 20 May 2005 05:13:45 -0000 1.30
@@ -19,11 +19,24 @@
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 @@
}
}
+/*
+ * 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 */
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_hints.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- e_hints.h 17 May 2005 17:41:27 -0000 1.14
+++ e_hints.h 20 May 2005 05:13:45 -0000 1.15
@@ -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);
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs