Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h menus.c tooltips.c warp.c
Log Message:
Inhibit tooltips while showing focus list or menus.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.362
retrieving revision 1.363
diff -u -3 -r1.362 -r1.363
--- E.h 9 Feb 2005 13:45:25 -0000 1.362
+++ E.h 10 Feb 2005 10:35:14 -0000 1.363
@@ -2162,6 +2162,7 @@
void TooltipsHandleEvent(void);
void TooltipsHide(void);
+void TooltipsEnable(int enable);
/* ttfont.c */
void Efont_extents(Efont * f, const char *text,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -3 -r1.165 -r1.166
--- menus.c 8 Feb 2005 21:12:08 -0000 1.165
+++ menus.c 10 Feb 2005 10:35:15 -0000 1.166
@@ -388,6 +388,7 @@
Mode_menus.current_depth = 1;
MenuShowMasker(m);
#endif
+ TooltipsEnable(0);
GrabKeyboard(m->win);
}
m->ref_count++;
@@ -1083,11 +1084,6 @@
MoveEwin(ewin, lx, ly);
ShowEwin(ewin);
}
-#if 0
- Mode_menus.list[0] = m;
- Mode_menus.current_depth = 1;
- MenuShowMasker(m);
-#endif
}
return m;
@@ -1107,18 +1103,6 @@
{
if (!FindEwinByMenu(m)) /* Don't show if already shown */
MenuShow(m, 0);
-#if 0
- Mode_menus.list[0] = m;
- Mode_menus.current_depth = 1;
- MenuShowMasker(m);
- m->ref_count++;
- }
- else
- {
- Mode_menus.list[0] = NULL;
- Mode_menus.current_depth = 0;
- MenuHideMasker();
-#endif
}
}
@@ -1148,17 +1132,6 @@
{
if (!FindEwinByMenu(m))
MenuShow(m, 0);
-#if 0
- Mode_menus.list[0] = m;
- Mode_menus.current_depth = 1;
- MenuShowMasker(m);
- }
- else
- {
- Mode_menus.list[0] = NULL;
- Mode_menus.current_depth = 0;
- MenuHideMasker();
-#endif
}
}
@@ -1181,6 +1154,7 @@
MenuHideMasker();
Mode_menus.current_depth = 0;
Mode_menus.clicked = 0;
+ TooltipsEnable(1);
#if 0
/* If all done properly this shouldn't be necessary... */
@@ -1358,11 +1332,6 @@
unsigned int mw, mh;
EWin *ewin2;
-#if 0
- Mode_menus.list[0] = m;
- Mode_menus.current_depth = 1;
- MenuShowMasker(m);
-#endif
ewin = FindEwinByMenu(m);
if (ewin)
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/tooltips.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- tooltips.c 2 Feb 2005 17:12:05 -0000 1.69
+++ tooltips.c 10 Feb 2005 10:35:16 -0000 1.70
@@ -31,6 +31,11 @@
unsigned int opacity;
} Conf_tooltips;
+static struct
+{
+ int inhibit;
+} Mode_tooltips;
+
struct _tooltip
{
char *name;
@@ -684,6 +689,20 @@
}
}
+void
+TooltipsEnable(int enable)
+{
+ if (enable)
+ {
+ if (Mode_tooltips.inhibit > 0)
+ Mode_tooltips.inhibit--;
+ }
+ else
+ {
+ Mode_tooltips.inhibit++;
+ }
+}
+
static ToolTip *ttip = NULL;
static void
@@ -750,10 +769,14 @@
{
if (ttip)
TooltipHide(ttip);
+
RemoveTimerEvent("TOOLTIP_TIMEOUT");
- if (Conf_tooltips.enable)
- DoIn("TOOLTIP_TIMEOUT", 0.001 * Conf_tooltips.delay, ToolTipTimeout, 0,
- NULL);
+
+ if (Mode_tooltips.inhibit || !Conf_tooltips.enable)
+ return;
+
+ DoIn("TOOLTIP_TIMEOUT", 0.001 * Conf_tooltips.delay, ToolTipTimeout, 0,
+ NULL);
}
/*
@@ -765,6 +788,9 @@
{
switch (sig)
{
+ case ESIGNAL_INIT:
+ memset(&Mode_tooltips, 0, sizeof(Mode_tooltips));
+ break;
case ESIGNAL_AREA_SWITCH_START:
case ESIGNAL_DESK_SWITCH_START:
TooltipsHide();
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- warp.c 9 Feb 2005 19:29:16 -0000 1.55
+++ warp.c 10 Feb 2005 10:35:16 -0000 1.56
@@ -82,6 +82,7 @@
warpFocusTitleWindow = ECreateWindow(VRoot.win, 0, 0, 1, 1, 1);
EventCallbackRegister(warpFocusTitleWindow, 0, WarpFocusHandleEvent,
NULL);
+ TooltipsEnable(0);
}
pq = Mode.queue_up;
@@ -217,6 +218,11 @@
EDestroyWindow(warplist[i].win);
Efree(warplist[i].txt);
}
+ EventCallbackUnregister(warpFocusTitleWindow, 0, WarpFocusHandleEvent,
+ NULL);
+ EDestroyWindow(warpFocusTitleWindow);
+ TooltipsEnable(1);
+ warpFocusTitleWindow = None;
}
if (warplist)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs