Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h borders.c evhandlers.c ewmh.c pager.c
Log Message:
Various tweaks for nested E.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -3 -r1.298 -r1.299
--- E.h 30 Jun 2004 13:03:58 -0000 1.298
+++ E.h 1 Jul 2004 21:04:40 -0000 1.299
@@ -983,6 +983,10 @@
int head;
struct
{
+ unsigned vroot:1; /* Virtual root window */
+ } props;
+ struct
+ {
unsigned maximized_horz:1;
unsigned maximized_vert:1;
unsigned fullscreen:1;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -3 -r1.205 -r1.206
--- borders.c 1 Jul 2004 09:13:22 -0000 1.205
+++ borders.c 1 Jul 2004 21:04:41 -0000 1.206
@@ -131,10 +131,10 @@
EDBUG(5, "GetEwinPointerInClient");
d = DesktopAt(Mode.x, Mode.y);
- XQueryPointer(disp, desks.desk[d].win, &rt, &ch, &(Mode.x), &(Mode.y), &dum,
- &dum, (unsigned int *)&dum);
- px = Mode.x - desks.desk[d].x;
- py = Mode.y - desks.desk[d].y;
+ XQueryPointer(disp, desks.desk[d].win, &rt, &ch, &dum, &dum, &px, &py,
+ (unsigned int *)&dum);
+ px -= desks.desk[d].x;
+ py -= desks.desk[d].y;
lst = EwinListGetForDesktop(d, &num);
for (i = 0; i < num; i++)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/evhandlers.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -3 -r1.169 -r1.170
--- evhandlers.c 30 Jun 2004 13:04:00 -0000 1.169
+++ evhandlers.c 1 Jul 2004 21:04:41 -0000 1.170
@@ -42,6 +42,10 @@
XQueryPointer(disp, VRoot.win, &rt, &ch, &dum, &dum, &x, &y, &mask))
EDBUG_RETURN_;
+ /* In case this is a virtual root */
+ if (x < 0 || y < 0 || x >= VRoot.w || y >= VRoot.h)
+ EDBUG_RETURN_;
+
/* dont pop up tooltip is mouse button down */
if (mask &
(Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask))
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- ewmh.c 18 Jun 2004 20:12:09 -0000 1.52
+++ ewmh.c 1 Jul 2004 21:04:42 -0000 1.53
@@ -556,6 +556,9 @@
EDBUG(6, "EWMH_GetWindowDesktop");
+ if (ewin->props.vroot)
+ goto done;
+
val = AtomGet(ewin->client.win, _NET_WM_DESKTOP, XA_CARDINAL, &size);
if (!val)
goto done;
@@ -694,10 +697,29 @@
EDBUG_RETURN_;
}
+static void
+EWMH_GetWindowMisc(EWin * ewin)
+{
+ CARD32 *val;
+ int size;
+
+ EDBUG(6, "EWMH_GetWindowMisc");
+
+ val = AtomGet(ewin->client.win, _NET_SUPPORTING_WM_CHECK, XA_WINDOW, &size);
+ if (val)
+ {
+ ewin->props.vroot = 1;
+ Efree(val);
+ }
+
+ EDBUG_RETURN_;
+}
+
void
EWMH_GetWindowHints(EWin * ewin)
{
EDBUG(6, "EWMH_GetWindowHints");
+ EWMH_GetWindowMisc(ewin);
EWMH_GetWindowName(ewin);
EWMH_GetWindowIconName(ewin);
EWMH_GetWindowDesktop(ewin);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -3 -r1.98 -r1.99
--- pager.c 28 Jun 2004 23:37:55 -0000 1.98
+++ pager.c 1 Jul 2004 21:04:42 -0000 1.99
@@ -1802,7 +1802,7 @@
{
Window win = ev->xbutton.window, child;
int used = 0;
- int i, num, px, py, in_pager;
+ int i, num, px, py, in_pager, in_vroot;
Pager *p;
EWin *ewin, **gwins;
int x, y, pax, pay;
@@ -1823,6 +1823,9 @@
XTranslateCoordinates(disp, win, p->win, px, py, &px, &py, &child);
in_pager = (px >= 0 && py >= 0 && px < p->w && py < p->h);
+ in_vroot = (Mode.x >= 0 && Mode.x < VRoot.w &&
+ Mode.y >= 0 && Mode.y < VRoot.h);
+
if (((int)ev->xbutton.button == Conf.pagers.sel_button))
{
if (win != Mode.last_bpress || !in_pager)
@@ -1878,6 +1881,16 @@
if (gwins)
Efree(gwins);
}
+ else if (ewin && ewin->props.vroot)
+ {
+ /* Dropping onto virtual root */
+ EwinReparent(p->hi_ewin, ewin->client.win);
+ }
+ else if (!in_vroot)
+ {
+ /* Move back to real root */
+ EwinReparent(p->hi_ewin, RRoot.win);
+ }
else
{
/* Pointer is not in pager or iconbox */
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs