Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
borders.c buttons.c desktops.c events.c tooltips.c
Log Message:
Get rid of spurious tooltips.
===================================================================
RCS file: /cvs/e/e16/e/src/borders.c,v
retrieving revision 1.296
retrieving revision 1.297
diff -u -3 -r1.296 -r1.297
--- borders.c 8 Apr 2007 19:25:02 -0000 1.296
+++ borders.c 23 Jul 2007 19:02:15 -0000 1.297
@@ -1024,25 +1024,14 @@
}
static void
-BorderWinpartHandleTooltip(EWinBit * wbit, int event)
+BorderWinpartHandleTooltip(EWinBit * wbit)
{
EWin *ewin = wbit->ewin;
int part = wbit - ewin->bits;
- switch (event)
- {
- case ButtonPress:
- case LeaveNotify:
- TooltipsSetPending(0, NULL, NULL);
- break;
- case ButtonRelease:
- case EnterNotify:
- case MotionNotify:
- if (!ewin->border->part[part].aclass)
- return;
- TooltipsSetPending(0, BorderWinpartGetAclass, wbit);
- break;
- }
+ if (!ewin->border->part[part].aclass)
+ return;
+ TooltipsSetPending(0, BorderWinpartGetAclass, wbit);
}
static void
@@ -1050,9 +1039,6 @@
{
EWinBit *wbit = (EWinBit *) prm;
- /* Beware! Actions may destroy the current border */
- BorderWinpartHandleTooltip(wbit, ev->type);
-
switch (ev->type)
{
case ButtonPress:
@@ -1062,10 +1048,15 @@
BorderWinpartEventMouseUp(wbit, ev);
break;
case EnterNotify:
+ /* Beware! Actions may destroy the current border */
+ BorderWinpartHandleTooltip(wbit);
BorderWinpartEventEnter(wbit, ev);
break;
case LeaveNotify:
BorderWinpartEventLeave(wbit, ev);
+ break;
+ case MotionNotify:
+ BorderWinpartHandleTooltip(wbit);
break;
}
}
===================================================================
RCS file: /cvs/e/e16/e/src/buttons.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- buttons.c 18 May 2007 08:25:01 -0000 1.102
+++ buttons.c 23 Jul 2007 19:02:15 -0000 1.103
@@ -635,23 +635,6 @@
}
static void
-ButtonHandleTooltip(Button * b, int event)
-{
- switch (event)
- {
- case ButtonPress:
- case LeaveNotify:
- TooltipsSetPending(0, NULL, NULL);
- break;
- case ButtonRelease:
- case EnterNotify:
- case MotionNotify:
- TooltipsSetPending(0, ButtonGetAclass, b);
- break;
- }
-}
-
-static void
ButtonHandleEvents(Win win __UNUSED__, XEvent * ev, void *prm)
{
Button *b = (Button *) prm;
@@ -666,6 +649,8 @@
break;
case MotionNotify:
ButtonEventMotion(b, ev);
+ if (b->aclass)
+ TooltipsSetPending(0, ButtonGetAclass, b);
break;
case EnterNotify:
ButtonEventMouseIn(b, ev);
@@ -674,9 +659,6 @@
ButtonEventMouseOut(b, ev);
break;
}
-
- if (b->aclass)
- ButtonHandleTooltip(b, ev->type);
if (b->func)
b->func(b->owner, ev, NULL);
===================================================================
RCS file: /cvs/e/e16/e/src/desktops.c,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -3 -r1.265 -r1.266
--- desktops.c 23 Jul 2007 18:59:42 -0000 1.265
+++ desktops.c 23 Jul 2007 19:02:15 -0000 1.266
@@ -1173,8 +1173,6 @@
DeskSwitchStart(void)
{
FocusNewDeskBegin();
-
- TooltipsSetPending(1, NULL, NULL);
}
static void
@@ -1909,23 +1907,6 @@
}
static void
-DeskHandleTooltip(Desk * dsk, XEvent * ev)
-{
- switch (ev->type)
- {
- case ButtonPress:
- case ButtonRelease:
- case LeaveNotify:
- TooltipsSetPending(1, NULL, NULL);
- break;
-
- case MotionNotify:
- TooltipsSetPending(1, DeskGetAclass, dsk);
- break;
- }
-}
-
-static void
DeskPropertyChange(Desk * dsk, XEvent * ev)
{
Pixmap pmap;
@@ -1984,6 +1965,7 @@
case MotionNotify:
/* Motion over desk buttons doesn't go here - We probably don't care
much. */
DesksSetCurrent(DesktopAt(Mode.events.x, Mode.events.y));
+ TooltipsSetPending(1, DeskGetAclass, dsk);
break;
case ConfigureNotify:
@@ -2006,8 +1988,6 @@
break;
#endif
}
-
- DeskHandleTooltip(dsk, ev);
}
/* Settings */
===================================================================
RCS file: /cvs/e/e16/e/src/events.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -3 -r1.139 -r1.140
--- events.c 11 Jul 2007 08:32:23 -0000 1.139
+++ events.c 23 Jul 2007 19:02:15 -0000 1.140
@@ -27,6 +27,7 @@
#include "events.h"
#include "session.h"
#include "timers.h"
+#include "tooltips.h"
#include "xwin.h"
#include <sys/time.h>
#if USE_XSYNC
@@ -275,6 +276,7 @@
Mode.events.time = ev->xbutton.time;
ModeGetXY(ev->xbutton.root, ev->xbutton.x_root, ev->xbutton.y_root);
Mode.events.on_screen = ev->xbutton.same_screen;
+ TooltipsSetPending(0, NULL, NULL);
goto do_stuff;
case MotionNotify:
@@ -296,6 +298,7 @@
if (!Mode.grabs.pointer_grab_active)
Mode.grabs.pointer_grab_active = 2;
}
+ TooltipsSetPending(0, NULL, NULL);
goto do_stuff;
case LeaveNotify:
@@ -307,6 +310,7 @@
Mode.grabs.pointer_grab_window = None;
Mode.grabs.pointer_grab_active = 0;
}
+ TooltipsSetPending(0, NULL, NULL);
goto do_stuff;
case PropertyNotify:
===================================================================
RCS file: /cvs/e/e16/e/src/tooltips.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -3 -r1.117 -r1.118
--- tooltips.c 22 Jul 2007 14:39:14 -0000 1.117
+++ tooltips.c 23 Jul 2007 19:02:15 -0000 1.118
@@ -797,6 +797,9 @@
void
TooltipsSetPending(int type, CB_GetAclass * func, void *data)
{
+ if (!Mode_tooltips.ac_func && !func)
+ return;
+
Mode_tooltips.ac_func = func;
Mode_tooltips.ac_data = data;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs