Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/dox
Modified Files:
dox.c
Log Message:
Fix centering when running e16 in window.
===================================================================
RCS file: /cvs/e/e16/e/dox/dox.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- dox.c 17 Jan 2007 01:10:40 -0000 1.41
+++ dox.c 28 May 2007 17:09:11 -0000 1.42
@@ -339,45 +339,42 @@
wx = (VRoot.w - w) / 2;
wy = (VRoot.h - (h + t)) / 2;
#ifdef HAVE_XINERAMA
- {
- if (XineramaIsActive(disp))
- {
- Window rt, ch;
- int d;
- unsigned int ud;
- int pointer_x, pointer_y;
- int num;
- XineramaScreenInfo *screens;
+ if (VRoot.win == DefaultRootWindow(disp) && XineramaIsActive(disp))
+ {
+ Window rt, ch;
+ int d;
+ unsigned int ud;
+ int pointer_x, pointer_y;
+ int num;
+ XineramaScreenInfo *screens;
- XQueryPointer(disp, VRoot.win, &rt, &ch, &pointer_x, &pointer_y,
- &d, &d, &ud);
+ XQueryPointer(disp, VRoot.win, &rt, &ch, &pointer_x, &pointer_y,
+ &d, &d, &ud);
- screens = XineramaQueryScreens(disp, &num);
- for (i = 0; i < num; i++)
- {
- if (pointer_x >= screens[i].x_org)
- {
- if (pointer_x <= (screens[i].width + screens[i].x_org))
- {
- if (pointer_y >= screens[i].y_org)
- {
- if (pointer_y <= (screens[i].height +
- screens[i].y_org))
- {
- wx = ((screens[i].width - w) / 2)
- + screens[i].x_org;
- wy = ((screens[i].height - (h + t)) / 2)
- + screens[i].y_org;
- }
- }
- }
- }
- }
+ screens = XineramaQueryScreens(disp, &num);
+ for (i = 0; i < num; i++)
+ {
+ if (pointer_x >= screens[i].x_org)
+ {
+ if (pointer_x <= (screens[i].width + screens[i].x_org))
+ {
+ if (pointer_y >= screens[i].y_org)
+ {
+ if (pointer_y <= (screens[i].height +
+ screens[i].y_org))
+ {
+ wx = ((screens[i].width - w) / 2)
+ + screens[i].x_org;
+ wy = ((screens[i].height - (h + t)) / 2)
+ + screens[i].y_org;
+ }
+ }
+ }
+ }
+ }
- XFree(screens);
- }
-
- }
+ XFree(screens);
+ }
#endif
win_main = CreateWindow(VRoot.win, wx, wy, w, h + t);
win_title =
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs