Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h actions.c cursors.c focus.c ipc.c
Log Message:
Partial fix to button grab problem.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -3 -r1.319 -r1.320
--- E.h 13 Aug 2004 20:41:25 -0000 1.319
+++ E.h 14 Aug 2004 00:47:17 -0000 1.320
@@ -1803,9 +1803,10 @@
#define ECSR_NONE 0
#define ECSR_ROOT 1
#define ECSR_GRAB 2
-#define ECSR_ACT_MOVE 3
-#define ECSR_ACT_RESIZE 4
-#define ECSR_COUNT 5
+#define ECSR_PGRAB 3
+#define ECSR_ACT_MOVE 4
+#define ECSR_ACT_RESIZE 5
+#define ECSR_COUNT 6
void ECursorsInit(void);
ECursor *ECursorCreate(const char *name, const char *image,
int native_id, XColor * fg, XColor * bg);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -3 -r1.175 -r1.176
--- actions.c 7 Aug 2004 21:00:08 -0000 1.175
+++ actions.c 14 Aug 2004 00:47:17 -0000 1.176
@@ -80,64 +80,67 @@
int j;
Action *a;
Window pager_hi_win;
+ unsigned int mod, button, mask;
ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
LIST_TYPE_ACLASS);
- if (ac)
- {
- pager_hi_win = PagerGetHiWin(ewin->pager);
- ac->ref_count++;
- for (j = 0; j < ac->num; j++)
- {
- a = ac->list[j];
- if ((a)
- && ((a->event == EVENT_MOUSE_DOWN)
- || (a->event == EVENT_MOUSE_UP)))
- {
- unsigned int mod, button, mask;
+ if (!ac)
+ return;
- mod = 0;
- button = 0;
- if (a->anymodifier)
- mod = AnyModifier;
- else
- mod = a->modifiers;
- if (a->anybutton)
- button = AnyButton;
- else
- button = a->button;
- mask = ButtonPressMask | ButtonReleaseMask;
- if (mod == AnyModifier)
- {
+ pager_hi_win = PagerGetHiWin(ewin->pager);
+ ac->ref_count++;
+ for (j = 0; j < ac->num; j++)
+ {
+ a = ac->list[j];
+ if ((!a) || ((a->event != EVENT_MOUSE_DOWN)
+ && (a->event != EVENT_MOUSE_UP)))
+ continue;
+
+ mod = 0;
+ button = 0;
+
+ if (a->anymodifier)
+ mod = AnyModifier;
+ else
+ mod = a->modifiers;
+
+ if (a->anybutton)
+ button = AnyButton;
+ else
+ button = a->button;
+
+ mask = ButtonPressMask | ButtonReleaseMask;
+
+ if (mod == AnyModifier)
+ {
#if 0 /* Why? */
- if (pager_hi_win)
- XGrabButton(disp, button, mod, pager_hi_win,
- False, mask, GrabModeSync, GrabModeAsync,
- None, None);
+ if (pager_hi_win)
+ XGrabButton(disp, button, mod, pager_hi_win,
+ False, mask, GrabModeSync, GrabModeAsync,
+ None, None);
#endif
- XGrabButton(disp, button, mod, ewin->win, False, mask,
- GrabModeSync, GrabModeAsync, None, None);
- }
- else
- {
- int i;
+ XGrabButton(disp, button, mod, ewin->win, False, mask,
+ GrabModeSync, GrabModeAsync,
+ ewin->win, ECsrGet(ECSR_PGRAB));
+ }
+ else
+ {
+ int i;
- for (i = 0; i < 8; i++)
- {
+ for (i = 0; i < 8; i++)
+ {
#if 0 /* Why? */
- if (pager_hi_win)
- XGrabButton(disp, button,
- mod | mask_mod_combos[i],
- pager_hi_win, False, mask,
- GrabModeSync, GrabModeAsync, None,
- None);
+ if (pager_hi_win)
+ XGrabButton(disp, button,
+ mod | mask_mod_combos[i],
+ pager_hi_win, False, mask,
+ GrabModeSync, GrabModeAsync, None, None);
#endif
- XGrabButton(disp, button, mod | mask_mod_combos[i],
- ewin->win, False, mask, GrabModeSync,
- GrabModeAsync, None, None);
- }
- }
+ XGrabButton(disp, button, mod | mask_mod_combos[i],
+ ewin->win, False, mask,
+ GrabModeSync, GrabModeAsync,
+ ewin->win, ECsrGet(ECSR_PGRAB));
}
}
}
@@ -150,53 +153,53 @@
int j;
Action *a;
Window pager_hi_win;
+ unsigned int mod, button;
ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
LIST_TYPE_ACLASS);
- if (ac)
- {
- pager_hi_win = PagerGetHiWin(ewin->pager);
- ac->ref_count--;
- for (j = 0; j < ac->num; j++)
- {
- a = ac->list[j];
- if ((a)
- && ((a->event == EVENT_MOUSE_DOWN)
- || (a->event == EVENT_MOUSE_UP)))
- {
- unsigned int mod, button;
+ if (!ac)
+ return;
- mod = 0;
- button = 0;
- if (a->anymodifier)
- mod = AnyModifier;
- else
- mod = a->modifiers;
- if (a->anybutton)
- button = AnyButton;
- else
- button = a->button;
- if (mod == AnyModifier)
- {
- if (pager_hi_win)
- XUngrabButton(disp, button, mod, pager_hi_win);
- XUngrabButton(disp, button, mod, ewin->win);
- }
- else
- {
- int i;
+ pager_hi_win = PagerGetHiWin(ewin->pager);
+ ac->ref_count--;
+ for (j = 0; j < ac->num; j++)
+ {
+ a = ac->list[j];
+ if ((!a) || ((a->event != EVENT_MOUSE_DOWN)
+ && (a->event != EVENT_MOUSE_UP)))
+ continue;
- for (i = 0; i < 8; i++)
- {
- if (pager_hi_win)
- XUngrabButton(disp, button,
- mod | mask_mod_combos[i],
- pager_hi_win);
- XUngrabButton(disp, button,
- mod | mask_mod_combos[i], ewin->win);
- }
- }
+ mod = 0;
+ button = 0;
+
+ if (a->anymodifier)
+ mod = AnyModifier;
+ else
+ mod = a->modifiers;
+
+ if (a->anybutton)
+ button = AnyButton;
+ else
+ button = a->button;
+
+ if (mod == AnyModifier)
+ {
+ if (pager_hi_win)
+ XUngrabButton(disp, button, mod, pager_hi_win);
+ XUngrabButton(disp, button, mod, ewin->win);
+ }
+ else
+ {
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (pager_hi_win)
+ XUngrabButton(disp, button,
+ mod | mask_mod_combos[i], pager_hi_win);
+ XUngrabButton(disp, button,
+ mod | mask_mod_combos[i], ewin->win);
}
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/cursors.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- cursors.c 18 Jul 2004 12:27:38 -0000 1.20
+++ cursors.c 14 Aug 2004 00:47:17 -0000 1.21
@@ -202,6 +202,7 @@
ECsrs[ECSR_NONE] = None;
ECsrs[ECSR_ROOT] = ECursorGetByName("DEFAULT", XC_left_ptr);
ECsrs[ECSR_GRAB] = ECursorGetByName("GRAB", XC_crosshair);
+ ECsrs[ECSR_PGRAB] = ECursorGetByName("PGRAB", XC_X_cursor);
ECsrs[ECSR_ACT_MOVE] = ECursorGetByName("GRAB_MOVE", XC_fleur);
ECsrs[ECSR_ACT_RESIZE] = ECursorGetByName("GRAB_RESIZE", XC_sizing);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- focus.c 23 Jul 2004 20:05:50 -0000 1.81
+++ focus.c 14 Aug 2004 00:47:17 -0000 1.82
@@ -161,13 +161,19 @@
{
XGrabButton(disp, AnyButton, AnyModifier, ewin->win_container,
False, ButtonPressMask, GrabModeSync, GrabModeAsync,
- None, None);
-/* Eprintf("FocusEwinSetGrabs: %#lx grab\n", ewin->client.win); */
+ ewin->win_container, ECsrGet(ECSR_PGRAB));
+#if 0
+ Eprintf("FocusEwinSetGrabs: %#lx grab %s\n", ewin->client.win,
+ EwinGetTitle(ewin));
+#endif
}
else
{
XUngrabButton(disp, AnyButton, AnyModifier, ewin->win_container);
-/* Eprintf("FocusEwinSetGrabs: %#lx ungrab\n", ewin->client.win); */
+#if 0
+ Eprintf("FocusEwinSetGrabs: %#lx ungrab %s\n", ewin->client.win,
+ EwinGetTitle(ewin));
+#endif
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -3 -r1.177 -r1.178
--- ipc.c 7 Aug 2004 23:11:44 -0000 1.177
+++ ipc.c 14 Aug 2004 00:47:17 -0000 1.178
@@ -4439,7 +4439,14 @@
l = 0;
sscanf(p, "%1000s %n", param, &l);
p += l;
- if (!strncmp(param, "unset", 2))
+ if (!strncmp(param, "allow", 2))
+ {
+ l = 0;
+ sscanf(p, "%d", &l);
+ XAllowEvents(disp, l, CurrentTime);
+ IpcPrintf("XAllowEvents\n");
+ }
+ else if (!strncmp(param, "unset", 2))
{
UnGrabTheButtons();
IpcPrintf("Ungrab\n");
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs