Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h events.c evhandlers.c setup.c
Log Message:
Shuffle around some event handling code (arrange according to event number).
Skip one level of event handling functions.
Show annoying message about RandR screen size change, if enabled.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -3 -r1.222 -r1.223
--- E.h 11 Mar 2004 23:44:17 -0000 1.222
+++ E.h 13 Mar 2004 22:49:47 -0000 1.223
@@ -26,6 +26,10 @@
#define _GNU_SOURCE
#include "config.h"
+#define USE_STRDUP 1 /* Use libc strdup if present */
+#define USE_STRNDUP 1 /* Use libc strndup if present */
+#define DEBUG_EWMH 0
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xproto.h>
@@ -33,10 +37,11 @@
#include <X11/Xlocale.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/XShm.h>
-
-#define USE_STRDUP 1 /* Use libc strdup if present */
-#define USE_STRNDUP 1 /* Use libc strndup if present */
-#define DEBUG_EWMH 0
+#ifdef HAS_XRANDR
+#ifdef HAVE_X11_EXTENSIONS_XRANDR_H
+#define USE_XRANDR 1
+#endif
+#endif
#define ESetColor(pxc, r, g, b) \
({ (pxc)->red = ((r)<<8)|r; (pxc)->green = ((g)<<8)|g; (pxc)->blue =
((b)<<8)|b; })
@@ -1963,25 +1968,27 @@
void EventShow(const XEvent * ev);
/* evhandlers.c */
-void HandleClientMessage(XEvent * ev);
+void HandleMouseDown(XEvent * ev);
+void HandleMouseUp(XEvent * ev);
+void HandleMotion(XEvent * ev);
+void HandleMouseIn(XEvent * ev);
+void HandleMouseOut(XEvent * ev);
void HandleFocusIn(XEvent * ev);
void HandleFocusOut(XEvent * ev);
-void HandleChildShapeChange(XEvent * ev);
-void HandleMotion(XEvent * ev);
+void HandleExpose(XEvent * ev);
void HandleDestroy(XEvent * ev);
-void HandleProperty(XEvent * ev);
-void HandleCirculate(XEvent * ev);
+void HandleUnmap(XEvent * ev);
+void HandleMap(XEvent * ev);
+void HandleMapRequest(XEvent * ev);
void HandleReparent(XEvent * ev);
+void HandleConfigureNotify(XEvent * ev);
void HandleConfigureRequest(XEvent * ev);
void HandleResizeRequest(XEvent * ev);
-void HandleMap(XEvent * ev);
-void HandleUnmap(XEvent * ev);
-void HandleMapRequest(XEvent * ev);
-void HandleExpose(XEvent * ev);
-void HandleMouseDown(XEvent * ev);
-void HandleMouseUp(XEvent * ev);
-void HandleMouseIn(XEvent * ev);
-void HandleMouseOut(XEvent * ev);
+void HandleCirculateRequest(XEvent * ev);
+void HandleProperty(XEvent * ev);
+void HandleClientMessage(XEvent * ev);
+void HandleChildShapeChange(XEvent * ev);
+void HandleScreenChange(XEvent * ev);
#if ENABLE_EWMH
/* ewmh.c */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- events.c 11 Mar 2004 16:58:13 -0000 1.56
+++ events.c 13 Mar 2004 22:49:48 -0000 1.57
@@ -23,12 +23,8 @@
#include "E.h"
#include <errno.h>
#include <sys/time.h>
-
-#ifdef HAS_XRANDR
-#ifdef HAVE_X11_EXTENSIONS_XRANDR_H
+#ifdef USE_XRANDR
#include <X11/extensions/Xrandr.h>
-#define USE_XRANDR 1
-#endif
#endif
static int event_base_shape = 0;
@@ -83,22 +79,6 @@
EExit((void *)1);
}
- /* check for the XTEST extension */
-/*
- * if (XTestQueryExtension(disp, &test_event_base, &test_error_base, &test_v1,
&test_v2))
- * {
- * XTestGrabControl(disp, True);
- * }
- * else
- * Alert("WARNING:\n"
- * "This Xserver does not support the XTest extension.\n"
- * "This is required for Enlightenment to run properly.\n"
- * "Enlightenment will continue to run, but parts may not.\n"
- * "Work correctly.\n"
- * "Please contact your system administrator, or see the manuals\n"
- * "For your XServer to find out how to enable the XTest\n"
- * "Extension\n");
- */
#ifdef USE_XRANDR
if (XRRQueryExtension(disp, &event_base_randr, &error_base_randr))
{
@@ -107,6 +87,9 @@
printf("Found extension RandR version %d.%d\n"
" Event/error base = %d/%d\n",
major, minor, event_base_randr, error_base_randr);
+
+ /* Listen for RandR events */
+ XRRSelectInput(disp, root.win, RRScreenChangeNotifyMask);
}
#endif
}
@@ -213,384 +196,6 @@
}
static void
-HKeyPress(XEvent * ev)
-{
- EDBUG(7, "HKeyPress");
- DialogEventKeyPress(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HKeyRelease(XEvent * ev)
-{
- EDBUG(7, "HKeyRelease");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-#if 0
-struct _pbuf
-{
- int w, h, depth;
- Pixmap id;
- void *stack[32];
- struct _pbuf *next;
-};
-extern struct _pbuf *pbuf = NULL;
-
-#endif
-
-static void
-HButtonPress(XEvent * ev)
-{
- EDBUG(7, "HButtonPress");
- SoundPlay("SOUND_BUTTON_CLICK");
- HandleMouseDown(ev);
-#if 0
- {
- int x, y, maxh = 0, count = 0, mcount = 0, ww, hh;
- struct _pbuf *pb;
- GC gc;
- XGCValues gcv;
-
- gc = XCreateGC(disp, root.win, 0, &gcv);
- XSetForeground(disp, gc, WhitePixel(disp, root.scr));
- fprintf(stderr, "Pixmaps allocated:\n");
- x = 0;
- y = 0;
- XClearWindow(disp, root.win);
- for (pb = pbuf; pb; pb = pb->next)
- {
- ww = pb->w;
- hh = pb->h;
- if (ww > 64)
- ww = 64;
- if (hh > 64)
- hh = 64;
- if (x + ww > root.w)
- {
- x = 0;
- y += maxh;
- maxh = 0;
- }
- XCopyArea(disp, pb->id, root.win, gc, 0, 0, ww, hh, x, y);
- XDrawRectangle(disp, root.win, gc, x, y, ww, hh);
- x += ww;
- if (hh > maxh)
- maxh = hh;
- count++;
- if (pb->depth == 1)
- mcount++;
- fprintf(stderr,
- "%08x (%5ix%5i %i) : " "%x %x %x %x %x %x %x %x "
- "%x %x %x %x %x %x %x %x " "%x %x %x %x %x %x %x %x "
- "%x %x %x %x %x %x %x %x\n", pb->id, pb->w, pb->h,
- pb->depth, pb->stack[0], pb->stack[1], pb->stack[2],
- pb->stack[3], pb->stack[4], pb->stack[5], pb->stack[6],
- pb->stack[7], pb->stack[8], pb->stack[9], pb->stack[10],
- pb->stack[11], pb->stack[12], pb->stack[13], pb->stack[14],
- pb->stack[15], pb->stack[16], pb->stack[17], pb->stack[18],
- pb->stack[19], pb->stack[20], pb->stack[21], pb->stack[22],
- pb->stack[23], pb->stack[24], pb->stack[25], pb->stack[26],
- pb->stack[27], pb->stack[28], pb->stack[29], pb->stack[30],
- pb->stack[31]);
- }
- fprintf(stderr, "Total %i, %i of them bitmaps\n", count, mcount);
- XFreeGC(disp, gc);
- }
-#endif
- EDBUG_RETURN_;
-}
-
-static void
-HButtonRelease(XEvent * ev)
-{
- EDBUG(7, "HButtonRelease");
- SoundPlay("SOUND_BUTTON_RAISE");
- HandleMouseUp(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HMotionNotify(XEvent * ev)
-{
- EDBUG(7, "HMotionNotify");
- HandleMotion(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HEnterNotify(XEvent * ev)
-{
- EDBUG(7, "HEnterNotify");
- HandleMouseIn(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HLeaveNotify(XEvent * ev)
-{
- EDBUG(7, "HLeaveNotify");
- HandleMouseOut(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HFocusIn(XEvent * ev)
-{
- EDBUG(7, "HFocusIn");
- HandleFocusIn(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HFocusOut(XEvent * ev)
-{
- EDBUG(7, "HFocusOut");
- HandleFocusOut(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HKeymapNotify(XEvent * ev)
-{
- EDBUG(7, "HKeymapNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HExpose(XEvent * ev)
-{
- EDBUG(7, "HExpose");
- HandleExpose(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HGraphicsExpose(XEvent * ev)
-{
- EDBUG(7, "HGraphicsExpose");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HNoExpose(XEvent * ev)
-{
- EDBUG(7, "HNoExpose");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HVisibilityNotify(XEvent * ev)
-{
- EDBUG(7, "HVisibilityNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HCreateNotify(XEvent * ev)
-{
- EDBUG(7, "HCreateNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HDestroyNotify(XEvent * ev)
-{
- EDBUG(7, "HDestroyNotify");
- HandleDestroy(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HUnmapNotify(XEvent * ev)
-{
- EDBUG(7, "HUnmapNotify");
- HandleUnmap(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HMapNotify(XEvent * ev)
-{
- EDBUG(7, "HMapNotify");
- HandleMap(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HMapRequest(XEvent * ev)
-{
- EDBUG(7, "HMapRequest");
- HandleMapRequest(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HReparentNotify(XEvent * ev)
-{
- EDBUG(7, "HReparentNotify");
- HandleReparent(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HConfigureNotify(XEvent * ev)
-{
- EDBUG(7, "HConfigureNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HConfigureRequest(XEvent * ev)
-{
- EDBUG(7, "HConfigureRequest");
- HandleConfigureRequest(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HGravityNotify(XEvent * ev)
-{
- EDBUG(7, "HGravityNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HResizeRequest(XEvent * ev)
-{
- EDBUG(7, "HResizeRequest");
- HandleResizeRequest(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HCirculateNotify(XEvent * ev)
-{
- EDBUG(7, "HCirculateNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HCirculateRequest(XEvent * ev)
-{
- EDBUG(7, "HCirculateRequest");
- HandleCirculate(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HPropertyNotify(XEvent * ev)
-{
- EDBUG(7, "HPropertyNotify");
- HandleProperty(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HSelectionClear(XEvent * ev)
-{
- EDBUG(7, "HSelectionClear");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HSelectionRequest(XEvent * ev)
-{
- EDBUG(7, "HSelectionRequest");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HSelectionNotify(XEvent * ev)
-{
- EDBUG(7, "HSelectionNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HColormapNotify(XEvent * ev)
-{
- EDBUG(7, "HColormapNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-HClientMessage(XEvent * ev)
-{
- EDBUG(7, "HClientMessage");
- HandleClientMessage(ev);
- EDBUG_RETURN_;
-}
-
-static void
-HMappingNotify(XEvent * ev)
-{
- EDBUG(7, "HMappingNotify");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static void
-DefaultFunc(XEvent * ev)
-{
- EDBUG(7, "DefaultFunc");
- ev = NULL;
- EDBUG_RETURN_;
-}
-
-static HandleStruct HArray[] = {
- {DefaultFunc},
- {DefaultFunc},
- {HKeyPress},
- {HKeyRelease},
- {HButtonPress},
- {HButtonRelease},
- {HMotionNotify},
- {HEnterNotify},
- {HLeaveNotify},
- {HFocusIn},
- {HFocusOut},
- {HKeymapNotify},
- {HExpose},
- {HGraphicsExpose},
- {HNoExpose},
- {HVisibilityNotify},
- {HCreateNotify},
- {HDestroyNotify},
- {HUnmapNotify},
- {HMapNotify},
- {HMapRequest},
- {HReparentNotify},
- {HConfigureNotify},
- {HConfigureRequest},
- {HGravityNotify},
- {HResizeRequest},
- {HCirculateNotify},
- {HCirculateRequest},
- {HPropertyNotify},
- {HSelectionClear},
- {HSelectionRequest},
- {HSelectionNotify},
- {HColormapNotify},
- {HClientMessage},
- {HMappingNotify},
- {DefaultFunc}
-};
-
-static void
HandleEvent(XEvent * ev)
{
void **lst;
@@ -604,13 +209,14 @@
#endif
mode.current_event = ev;
- if (ev->type == event_base_shape + ShapeNotify)
- HandleChildShapeChange(ev);
-
- if ((ev->type == KeyPress) || (ev->type == KeyRelease)
- || (ev->type == ButtonPress) || (ev->type == ButtonRelease)
- || (ev->type == EnterNotify) || (ev->type == LeaveNotify))
+ switch (ev->type)
{
+ case KeyPress:
+ case KeyRelease:
+ case ButtonPress:
+ case ButtonRelease:
+ case EnterNotify:
+ case LeaveNotify:
if (((ev->type == KeyPress) || (ev->type == KeyRelease))
&& (ev->xkey.root != root.win))
{
@@ -633,11 +239,110 @@
Efree(lst);
}
}
+ break;
}
- if (ev->type <= 35)
- HArray[ev->type].func(ev);
+ switch (ev->type)
+ {
+ case KeyPress: /* 2 */
+ DialogEventKeyPress(ev);
+ break;
+ case KeyRelease: /* 3 */
+ break;
+ case ButtonPress: /* 4 */
+ SoundPlay("SOUND_BUTTON_CLICK");
+ HandleMouseDown(ev);
+ break;
+ case ButtonRelease: /* 5 */
+ SoundPlay("SOUND_BUTTON_RAISE");
+ HandleMouseUp(ev);
+ break;
+ case MotionNotify: /* 6 */
+ HandleMotion(ev);
+ break;
+ case EnterNotify: /* 7 */
+ HandleMouseIn(ev);
+ break;
+ case LeaveNotify: /* 8 */
+ HandleMouseOut(ev);
+ break;
+ case FocusIn: /* 9 */
+ HandleFocusIn(ev);
+ break;
+ case FocusOut: /* 10 */
+ HandleFocusOut(ev);
+ break;
+ case KeymapNotify: /* 11 */
+ break;
+ case Expose: /* 12 */
+ HandleExpose(ev);
+ break;
+ case GraphicsExpose: /* 13 */
+ break;
+ case NoExpose: /* 14 */
+ break;
+ case VisibilityNotify: /* 15 */
+ break;
+ case CreateNotify: /* 16 */
+ break;
+ case DestroyNotify: /* 17 */
+ HandleDestroy(ev);
+ break;
+ case UnmapNotify: /* 18 */
+ HandleUnmap(ev);
+ break;
+ case MapNotify: /* 19 */
+ HandleMap(ev);
+ break;
+ case MapRequest: /* 20 */
+ HandleMapRequest(ev);
+ break;
+ case ReparentNotify: /* 21 */
+ HandleReparent(ev);
+ break;
+ case ConfigureNotify: /* 22 */
+ HandleConfigureNotify(ev);
+ break;
+ case ConfigureRequest: /* 23 */
+ HandleConfigureRequest(ev);
+ break;
+ case GravityNotify: /* 24 */
+ break;
+ case ResizeRequest: /* 25 */
+ HandleResizeRequest(ev);
+ break;
+ case CirculateNotify: /* 26 */
+ break;
+ case CirculateRequest: /* 27 */
+ HandleCirculateRequest(ev);
+ break;
+ case PropertyNotify: /* 28 */
+ HandleProperty(ev);
+ break;
+ case SelectionClear: /* 29 */
+ break;
+ case SelectionRequest: /* 30 */
+ break;
+ case SelectionNotify: /* 31 */
+ break;
+ case ColormapNotify: /* 32 */
+ break;
+ case ClientMessage: /* 33 */
+ HandleClientMessage(ev);
+ break;
+ case MappingNotify: /* 34 */
+ break;
+ default:
+ if (ev->type == event_base_shape + ShapeNotify)
+ HandleChildShapeChange(ev);
+#ifdef USE_XRANDR
+ else if (ev->type == event_base_randr + RRScreenChangeNotify)
+ HandleScreenChange(ev);
+#endif
+ break;
+ }
+ /* Should not be "global" */
IconboxesHandleEvent(ev);
if (diddeskaccount)
@@ -968,8 +673,14 @@
case MapNotify:
case MapRequest:
case ReparentNotify:
- case ConfigureNotify:
goto case_common;
+ case ConfigureNotify:
+ printf("EV-%s: win=%#lx event=%#lx %d+%d %dx%d bw=%d above=%#lx\n",
+ name, ev->xconfigure.window, win,
+ ev->xconfigure.x, ev->xconfigure.y,
+ ev->xconfigure.width, ev->xconfigure.height,
+ ev->xconfigure.border_width, ev->xconfigure.above);
+ break;
case ConfigureRequest:
printf
("EV-%s: win=%#lx parent=%#lx m=%#lx %d+%d %dx%d bw=%d above=%#lx stk=%d\n",
@@ -1015,6 +726,10 @@
default:
if (ev->type == event_base_shape + ShapeNotify)
printf("EV-ShapeNotify win=%#lx\n", win);
+#ifdef USE_XRANDR
+ else if (ev->type == event_base_randr + RRScreenChangeNotify)
+ printf("EV-RRScreenChangeNotify win=%#lx\n", win);
+#endif
else
printf("EV-??? Type=%d win=%#lx\n", ev->type, win);
break;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/evhandlers.c,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -3 -r1.154 -r1.155
--- evhandlers.c 2 Mar 2004 19:17:17 -0000 1.154
+++ evhandlers.c 13 Mar 2004 22:49:48 -0000 1.155
@@ -101,77 +101,224 @@
}
void
-HandleClientMessage(XEvent * ev)
+HandleMouseDown(XEvent * ev)
{
- EDBUG(5, "HandleClientMessage");
+ Window win = ev->xbutton.window;
+ EWin *ewin;
+ int i;
+ int desk_click;
+ char double_click = 0;
+ float mode_double_click_time = 0.25;
- HintsProcessClientMessage(&(ev->xclient));
+ EDBUG(5, "HandleMouseDown");
- EDBUG_RETURN_;
-}
+ /* DON'T handle clicks whilst moving/resizing things unless doing manual placement
*/
+ if (mode.mode != MODE_NONE)
+ EDBUG_RETURN_;
-void
-HandleFocusIn(XEvent * ev)
-{
- Window win = ev->xfocus.window;
- EWin *ewin;
+ if ((mode.cur_menu_mode) && (!clickmenu))
+ {
+ unsigned int bmask = 0, evmask;
- EDBUG(5, "HandleFocusIn");
+ evmask =
+ ev->xbutton.state & (Button1Mask | Button2Mask | Button3Mask |
+ Button4Mask | Button5Mask);
+ if (ev->xbutton.button == 1)
+ bmask = Button1Mask;
+ else if (ev->xbutton.button == 2)
+ bmask = Button2Mask;
+ else if (ev->xbutton.button == 3)
+ bmask = Button3Mask;
+ else if (ev->xbutton.button == 4)
+ bmask = Button4Mask;
+ else if (ev->xbutton.button == 5)
+ bmask = Button5Mask;
+ if (bmask != evmask)
+ clickmenu = 1;
+ else
+ {
+ EDBUG_RETURN_;
+ }
+ }
- ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin && !ewin->active)
+ TooltipsHandleEvent();
+
+ if ((((float)(ev->xbutton.time - mode.last_time) / 1000) <
+ mode_double_click_time) &&
+ ((int)(ev->xbutton.button) == (int)(mode.last_button)))
+ double_click = 1;
+
+ mode.last_time = ev->xbutton.time;
+ mode.last_button = ev->xbutton.button;
+ mode.last_bpress = win;
+
+ mode.x = ev->xbutton.x_root;
+ mode.y = ev->xbutton.y_root;
+
+ desk_click = -1;
+ for (i = 0; i < conf.desks.num; i++)
{
- ewin->active = 1;
- DrawEwin(ewin);
+ if (win == desks.desk[i].win)
+ {
+ desk_click = i;
+ break;
+ }
+ }
+ if (desk_click >= 0)
+ {
+ ActionClass *ac;
- FocusEwinSetGrabs(ewin);
+ XUngrabPointer(disp, CurrentTime);
+
+ ac = FindItem("DESKBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS);
+ if (ac)
+ {
+ if (!EventAclass(ev, NULL, ac))
+ ButtonProxySendEvent(ev);
+ }
+ EDBUG_RETURN_;
}
- EDBUG_RETURN_;
-}
+ if (MenusEventMouseDown(ev))
+ goto exit;
-void
-HandleFocusOut(XEvent * ev)
-{
- Window win = ev->xfocus.window;
- EWin *ewin;
+ FocusHandleClick(win);
- EDBUG(5, "HandleFocusOut");
+ if (double_click)
+ ev->xbutton.time = 0;
- /* Do nothing if the focus is passed down to child */
- if (ev->xfocus.detail == NotifyInferior)
+ if ( /*!clickmenu && */ BordersEventMouseDown(ev))
goto exit;
- ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin && ewin->active)
+ if (ButtonsEventMouseDown(ev))
+ goto exit;
+
+ if (DialogEventMouseDown(ev))
+ goto exit;
+
+ ewin = FindEwinByBase(win);
+ if (ewin)
{
- ewin->active = 0;
- DrawEwin(ewin);
+ ActionClass *ac;
- FocusEwinSetGrabs(ewin);
+ ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
+ LIST_TYPE_ACLASS);
+ if (ac)
+ {
+ GrabThePointer(ewin->win);
+ if (EventAclass(ev, ewin, ac))
+ {
+ goto exit;
+ }
+ }
}
+ if (PagersEventMouseDown(ev))
+ goto exit;
+
exit:
EDBUG_RETURN_;
}
void
-HandleChildShapeChange(XEvent * ev)
+HandleMouseUp(XEvent * ev)
{
- Window win;
+ Window win = ev->xbutton.window;
EWin *ewin;
- Border *b;
+ Slideout *pslideout;
- EDBUG(5, "HandleChildShapeChange");
- win = ((XShapeEvent *) ev)->window;
- ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+ EDBUG(5, "HandleMouseUp");
+
+ /* DON'T handle clicks whilst moving/resizing things */
+ if ((mode.mode != MODE_NONE) &&
+ (!((mode.place) &&
+ (mode.mode == MODE_MOVE_PENDING || mode.mode == MODE_MOVE))))
+ {
+ if ((int)mode.last_button != (int)ev->xbutton.button)
+ EDBUG_RETURN_;
+ }
+
+ TooltipsHandleEvent();
+ UnGrabTheButtons();
+
+ mode.x = ev->xbutton.x_root;
+ mode.y = ev->xbutton.y_root;
+
+ pslideout = mode.slideout;
+
+ ActionsEnd(NULL);
+
+ if ((mode.last_bpress) && (mode.last_bpress != win))
+ {
+ ev->xbutton.window = mode.last_bpress;
+ BordersEventMouseOut2(ev);
+ ev->xbutton.window = win;
+ }
+
+ if (mode.place)
+ {
+ mode.place = 0;
+ goto exit;
+ }
+
+ if (sentpress)
+ {
+ /* We never get here? */
+ sentpress = 0;
+ ButtonProxySendEvent(ev);
+ }
+
+ mode.context_win = mode.last_bpress;
+
+ if ((((float)(ev->xbutton.time - mode.last_time) / 1000) < 0.5)
+ && (mode.cur_menu_depth > 0) && (!clickmenu))
+ {
+ clickmenu = 1;
+ mode.justclicked = 1;
+ }
+
+ if ( /*!clickmenu && */ BordersEventMouseUp(ev))
+ goto exit;
+
+ if (mode.action_inhibit)
+ goto exit;
+
+ if (MenusEventMouseUp(ev))
+ goto exit;
+
+ if (ButtonsEventMouseUp(ev))
+ goto exit;
+
+ if (DialogEventMouseUp(ev))
+ goto exit;
+
+ ewin = FindEwinByBase(win);
if (ewin)
{
- b = ewin->border;
- SyncBorderToEwin(ewin);
- if (ewin->border == b)
- PropagateShapes(ewin->win);
+ ActionClass *ac;
+
+ ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
+ LIST_TYPE_ACLASS);
+ if (ac)
+ {
+ if (EventAclass(ev, ewin, ac))
+ {
+ goto exit;
+ }
+ }
}
+
+ if (PagersEventMouseUp(ev))
+ goto exit;
+
+ exit:
+ if ((mode.slideout) && (pslideout))
+ SlideoutHide(mode.slideout);
+
+ mode.action_inhibit = 0;
+ mode.justclicked = 0;
+ mode.last_bpress = 0;
+
EDBUG_RETURN_;
}
@@ -364,87 +511,253 @@
}
void
-HandleDestroy(XEvent * ev)
+HandleMouseIn(XEvent * ev)
{
- Window win = ev->xdestroywindow.window;
- EWin *ewin;
- Client *c;
+ Window win = ev->xcrossing.window;
- EDBUG(5, "HandleDestroy");
+ EDBUG(5, "HandleMouseIn");
- EForgetWindow(disp, win);
+ if (mode.mode != MODE_NONE)
+ EDBUG_RETURN_;
- if (win == mode.context_win)
- mode.context_win = 0;
+ if (win == root.win)
+ goto exit;
- ewin = RemoveItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin)
- {
- FreeEwin(ewin);
- EDBUG_RETURN_;
- }
+ mode.context_win = win;
- c = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_CLIENT);
- if (c)
- DeleteClient(c);
+ TooltipsHandleEvent();
+ EdgeHandleEnter(ev);
- EDBUG_RETURN_;
+ if (PagersEventMouseIn(ev))
+ goto exit;
+
+ if (MenusEventMouseIn(ev))
+ goto exit;
+
+ if ( /*!clickmenu && */ BordersEventMouseIn(ev))
+ goto exit;
+
+ if (ButtonsEventMouseIn(ev))
+ goto exit;
+
+ if (DialogEventMouseIn(ev))
+ goto exit;
+
+ exit:
+ FocusHandleEnter(ev);
+
+ EDBUG_RETURN_;
}
void
-HandleProperty(XEvent * ev)
+HandleMouseOut(XEvent * ev)
{
- Window win = ev->xproperty.window;
+ Window win = ev->xcrossing.window;
+
+ EDBUG(5, "HandleMouseOut");
+
+ if (mode.mode != MODE_NONE)
+ EDBUG_RETURN_;
+
+ TooltipsHandleEvent();
+ EdgeHandleLeave(ev);
+
+ mode.context_win = win;
+
+ if (PagersEventMouseOut(ev))
+ goto exit;
+
+ if (MenusEventMouseOut(ev))
+ goto exit;
+
+ if ( /*!clickmenu && */ BordersEventMouseOut(ev))
+ goto exit;
+
+ if (ButtonsEventMouseOut(ev))
+ goto exit;
+
+ if (DialogEventMouseOut(ev))
+ goto exit;
+
+ exit:
+ FocusHandleLeave(ev);
+
+ EDBUG_RETURN_;
+}
+
+void
+HandleFocusIn(XEvent * ev)
+{
+ Window win = ev->xfocus.window;
EWin *ewin;
- EDBUG(5, "HandleProperty");
+ EDBUG(5, "HandleFocusIn");
ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (!ewin)
+ if (ewin && !ewin->active)
+ {
+ ewin->active = 1;
+ DrawEwin(ewin);
+
+ FocusEwinSetGrabs(ewin);
+ }
+
+ EDBUG_RETURN_;
+}
+
+void
+HandleFocusOut(XEvent * ev)
+{
+ Window win = ev->xfocus.window;
+ EWin *ewin;
+
+ EDBUG(5, "HandleFocusOut");
+
+ /* Do nothing if the focus is passed down to child */
+ if (ev->xfocus.detail == NotifyInferior)
goto exit;
- GrabX();
- EwinChangesStart(ewin);
+ ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+ if (ewin && ewin->active)
+ {
+ ewin->active = 0;
+ DrawEwin(ewin);
- HintsProcessPropertyChange(ewin, ev->xproperty.atom);
- ICCCM_GetTitle(ewin, ev->xproperty.atom);
- ICCCM_GetHints(ewin, ev->xproperty.atom);
- ICCCM_GetInfo(ewin, ev->xproperty.atom);
- ICCCM_Cmap(ewin);
- ICCCM_GetGeoms(ewin, ev->xproperty.atom);
- SessionGetInfo(ewin, ev->xproperty.atom);
- SyncBorderToEwin(ewin);
+ FocusEwinSetGrabs(ewin);
+ }
- EwinChangesProcess(ewin);
- UngrabX();
+ exit:
+ EDBUG_RETURN_;
+}
+
+void
+HandleExpose(XEvent * ev)
+{
+ EDBUG(5, "HandleExpose");
+
+ if (BordersEventExpose(ev))
+ goto exit;
+
+ if (ButtonsEventExpose(ev))
+ goto exit;
+
+ if (DialogEventExpose(ev))
+ goto exit;
exit:
EDBUG_RETURN_;
}
void
-HandleCirculate(XEvent * ev)
+HandleDestroy(XEvent * ev)
{
- Window win;
+ Window win = ev->xdestroywindow.window;
EWin *ewin;
+ Client *c;
- EDBUG(5, "HandleCirculate");
- win = ev->xcirculaterequest.window;
+ EDBUG(5, "HandleDestroy");
+
+ EForgetWindow(disp, win);
+
+ if (win == mode.context_win)
+ mode.context_win = 0;
+
+ ewin = RemoveItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+ if (ewin)
+ {
+ FreeEwin(ewin);
+ EDBUG_RETURN_;
+ }
+
+ c = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_CLIENT);
+ if (c)
+ DeleteClient(c);
+
+ EDBUG_RETURN_;
+}
+
+void
+HandleUnmap(XEvent * ev)
+{
+ Window win = ev->xunmap.window;
+ EWin *ewin;
+
+ EDBUG(5, "HandleUnmap");
ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
if (ewin)
{
- if (ev->xcirculaterequest.place == PlaceOnTop)
- RaiseEwin(ewin);
+ ewin->mapped = 0;
+
+ if (ewin->pager)
+ PagerEventUnmap(ewin->pager);
+
+ if (conf.dockapp_support && ewin->docked)
+ DockDestroy(ewin);
+
+ ActionsEnd(ewin);
+ if (ewin == GetContextEwin())
+ SlideoutsHide();
+
+ if (ewin == mode.focuswin)
+ FocusToEWin(NULL, FOCUS_EWIN_GONE);
+ if (ewin == mode.mouse_over_win)
+ mode.mouse_over_win = NULL;
+
+ if (!ewin->iconified)
+ {
+ XTranslateCoordinates(disp, ewin->client.win, root.win,
+ -ewin->border->border.left,
+ -ewin->border->border.top, &ewin->client.x,
+ &ewin->client.y, &win);
+ EReparentWindow(disp, ewin->client.win, root.win, ewin->client.x,
+ ewin->client.y);
+ ICCCM_Withdraw(ewin);
+ RemoveItem(NULL, ewin->client.win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+ FreeEwin(ewin);
+ }
else
- LowerEwin(ewin);
+ {
+ HideEwin(ewin);
+ }
+ }
+ EDBUG_RETURN_;
+}
+
+void
+HandleMap(XEvent * ev)
+{
+ Window win = ev->xunmap.window;
+ EWin *ewin;
+
+ EDBUG(5, "HandleMap");
+ ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+ if (ewin)
+ {
+ ewin->mapped = 1;
+ }
+ EDBUG_RETURN_;
+}
+
+void
+HandleMapRequest(XEvent * ev)
+{
+ Window win;
+ EWin *ewin;
+
+ EDBUG(5, "HandleMapRequest");
+
+ win = ev->xconfigurerequest.window;
+ ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+ if (ewin && ewin->iconified)
+ {
+ DeIconifyEwin(ewin);
}
else
{
- if (ev->xcirculaterequest.place == PlaceOnTop)
- XRaiseWindow(disp, win);
- else
- XLowerWindow(disp, win);
+ AddToFamily(ev->xmap.window);
+ HintsSetClientList();
}
+
EDBUG_RETURN_;
}
@@ -456,6 +769,21 @@
}
void
+HandleConfigureNotify(XEvent * ev)
+{
+ EDBUG(5, "HandleConfigureNotify");
+
+#ifdef USE_XRANDR
+ if (ev->xconfigure.window == root.win)
+ DialogOK("Wheee! (ConfigureNotify)",
+ "Screen size changed to\n%dx%d pixels",
+ ev->xconfigure.width, ev->xconfigure.height);
+#endif
+
+ EDBUG_RETURN_;
+}
+
+void
HandleConfigureRequest(XEvent * ev)
{
Window win, winrel;
@@ -585,401 +913,107 @@
}
void
-HandleMap(XEvent * ev)
+HandleCirculateRequest(XEvent * ev)
{
- Window win = ev->xunmap.window;
+ Window win;
EWin *ewin;
- EDBUG(5, "HandleMap");
+ EDBUG(5, "HandleCirculate");
+ win = ev->xcirculaterequest.window;
ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
if (ewin)
{
- ewin->mapped = 1;
+ if (ev->xcirculaterequest.place == PlaceOnTop)
+ RaiseEwin(ewin);
+ else
+ LowerEwin(ewin);
+ }
+ else
+ {
+ if (ev->xcirculaterequest.place == PlaceOnTop)
+ XRaiseWindow(disp, win);
+ else
+ XLowerWindow(disp, win);
}
EDBUG_RETURN_;
}
void
-HandleUnmap(XEvent * ev)
+HandleProperty(XEvent * ev)
{
- Window win = ev->xunmap.window;
- EWin *ewin;
-
- EDBUG(5, "HandleUnmap");
- ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin)
- {
- ewin->mapped = 0;
-
- if (ewin->pager)
- PagerEventUnmap(ewin->pager);
-
- if (conf.dockapp_support && ewin->docked)
- DockDestroy(ewin);
-
- ActionsEnd(ewin);
- if (ewin == GetContextEwin())
- SlideoutsHide();
-
- if (ewin == mode.focuswin)
- FocusToEWin(NULL, FOCUS_EWIN_GONE);
- if (ewin == mode.mouse_over_win)
- mode.mouse_over_win = NULL;
-
- if (!ewin->iconified)
- {
- XTranslateCoordinates(disp, ewin->client.win, root.win,
- -ewin->border->border.left,
- -ewin->border->border.top, &ewin->client.x,
- &ewin->client.y, &win);
- EReparentWindow(disp, ewin->client.win, root.win, ewin->client.x,
- ewin->client.y);
- ICCCM_Withdraw(ewin);
- RemoveItem(NULL, ewin->client.win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- FreeEwin(ewin);
- }
- else
- {
- HideEwin(ewin);
- }
- }
- EDBUG_RETURN_;
-}
-
-void
-HandleMapRequest(XEvent * ev)
-{
- Window win;
+ Window win = ev->xproperty.window;
EWin *ewin;
- EDBUG(5, "HandleMapRequest");
+ EDBUG(5, "HandleProperty");
- win = ev->xconfigurerequest.window;
ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
- if (ewin && ewin->iconified)
- {
- DeIconifyEwin(ewin);
- }
- else
- {
- AddToFamily(ev->xmap.window);
- HintsSetClientList();
- }
-
- EDBUG_RETURN_;
-}
-
-void
-HandleExpose(XEvent * ev)
-{
- EDBUG(5, "HandleExpose");
-
- if (BordersEventExpose(ev))
+ if (!ewin)
goto exit;
- if (ButtonsEventExpose(ev))
- goto exit;
+ GrabX();
+ EwinChangesStart(ewin);
- if (DialogEventExpose(ev))
- goto exit;
+ HintsProcessPropertyChange(ewin, ev->xproperty.atom);
+ ICCCM_GetTitle(ewin, ev->xproperty.atom);
+ ICCCM_GetHints(ewin, ev->xproperty.atom);
+ ICCCM_GetInfo(ewin, ev->xproperty.atom);
+ ICCCM_Cmap(ewin);
+ ICCCM_GetGeoms(ewin, ev->xproperty.atom);
+ SessionGetInfo(ewin, ev->xproperty.atom);
+ SyncBorderToEwin(ewin);
+
+ EwinChangesProcess(ewin);
+ UngrabX();
exit:
EDBUG_RETURN_;
}
void
-HandleMouseDown(XEvent * ev)
+HandleClientMessage(XEvent * ev)
{
- Window win = ev->xbutton.window;
- EWin *ewin;
- int i;
- int desk_click;
- char double_click = 0;
- float mode_double_click_time = 0.25;
-
- EDBUG(5, "HandleMouseDown");
-
- /* DON'T handle clicks whilst moving/resizing things unless doing manual placement
*/
- if (mode.mode != MODE_NONE)
- EDBUG_RETURN_;
-
- if ((mode.cur_menu_mode) && (!clickmenu))
- {
- unsigned int bmask = 0, evmask;
-
- evmask =
- ev->xbutton.state & (Button1Mask | Button2Mask | Button3Mask |
- Button4Mask | Button5Mask);
- if (ev->xbutton.button == 1)
- bmask = Button1Mask;
- else if (ev->xbutton.button == 2)
- bmask = Button2Mask;
- else if (ev->xbutton.button == 3)
- bmask = Button3Mask;
- else if (ev->xbutton.button == 4)
- bmask = Button4Mask;
- else if (ev->xbutton.button == 5)
- bmask = Button5Mask;
- if (bmask != evmask)
- clickmenu = 1;
- else
- {
- EDBUG_RETURN_;
- }
- }
-
- TooltipsHandleEvent();
-
- if ((((float)(ev->xbutton.time - mode.last_time) / 1000) <
- mode_double_click_time) &&
- ((int)(ev->xbutton.button) == (int)(mode.last_button)))
- double_click = 1;
-
- mode.last_time = ev->xbutton.time;
- mode.last_button = ev->xbutton.button;
- mode.last_bpress = win;
-
- mode.x = ev->xbutton.x_root;
- mode.y = ev->xbutton.y_root;
-
- desk_click = -1;
- for (i = 0; i < conf.desks.num; i++)
- {
- if (win == desks.desk[i].win)
- {
- desk_click = i;
- break;
- }
- }
- if (desk_click >= 0)
- {
- ActionClass *ac;
-
- XUngrabPointer(disp, CurrentTime);
-
- ac = FindItem("DESKBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS);
- if (ac)
- {
- if (!EventAclass(ev, NULL, ac))
- ButtonProxySendEvent(ev);
- }
- EDBUG_RETURN_;
- }
-
- if (MenusEventMouseDown(ev))
- goto exit;
-
- FocusHandleClick(win);
-
- if (double_click)
- ev->xbutton.time = 0;
-
- if ( /*!clickmenu && */ BordersEventMouseDown(ev))
- goto exit;
-
- if (ButtonsEventMouseDown(ev))
- goto exit;
-
- if (DialogEventMouseDown(ev))
- goto exit;
-
- ewin = FindEwinByBase(win);
- if (ewin)
- {
- ActionClass *ac;
-
- ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
- LIST_TYPE_ACLASS);
- if (ac)
- {
- GrabThePointer(ewin->win);
- if (EventAclass(ev, ewin, ac))
- {
- goto exit;
- }
- }
- }
+ EDBUG(5, "HandleClientMessage");
- if (PagersEventMouseDown(ev))
- goto exit;
+ HintsProcessClientMessage(&(ev->xclient));
- exit:
EDBUG_RETURN_;
}
void
-HandleMouseUp(XEvent * ev)
+HandleChildShapeChange(XEvent * ev)
{
- Window win = ev->xbutton.window;
+ Window win = ((XShapeEvent *) ev)->window;
EWin *ewin;
- Slideout *pslideout;
-
- EDBUG(5, "HandleMouseUp");
-
- /* DON'T handle clicks whilst moving/resizing things */
- if ((mode.mode != MODE_NONE) &&
- (!((mode.place) &&
- (mode.mode == MODE_MOVE_PENDING || mode.mode == MODE_MOVE))))
- {
- if ((int)mode.last_button != (int)ev->xbutton.button)
- EDBUG_RETURN_;
- }
-
- TooltipsHandleEvent();
- UnGrabTheButtons();
-
- mode.x = ev->xbutton.x_root;
- mode.y = ev->xbutton.y_root;
-
- pslideout = mode.slideout;
-
- ActionsEnd(NULL);
-
- if ((mode.last_bpress) && (mode.last_bpress != win))
- {
- ev->xbutton.window = mode.last_bpress;
- BordersEventMouseOut2(ev);
- ev->xbutton.window = win;
- }
-
- if (mode.place)
- {
- mode.place = 0;
- goto exit;
- }
-
- if (sentpress)
- {
- /* We never get here? */
- sentpress = 0;
- ButtonProxySendEvent(ev);
- }
-
- mode.context_win = mode.last_bpress;
-
- if ((((float)(ev->xbutton.time - mode.last_time) / 1000) < 0.5)
- && (mode.cur_menu_depth > 0) && (!clickmenu))
- {
- clickmenu = 1;
- mode.justclicked = 1;
- }
-
- if ( /*!clickmenu && */ BordersEventMouseUp(ev))
- goto exit;
-
- if (mode.action_inhibit)
- goto exit;
-
- if (MenusEventMouseUp(ev))
- goto exit;
-
- if (ButtonsEventMouseUp(ev))
- goto exit;
+ Border *b;
- if (DialogEventMouseUp(ev))
- goto exit;
+ EDBUG(5, "HandleChildShapeChange");
- ewin = FindEwinByBase(win);
+ ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
if (ewin)
{
- ActionClass *ac;
-
- ac = (ActionClass *) FindItem("BUTTONBINDINGS", 0, LIST_FINDBY_NAME,
- LIST_TYPE_ACLASS);
- if (ac)
- {
- if (EventAclass(ev, ewin, ac))
- {
- goto exit;
- }
- }
+ b = ewin->border;
+ SyncBorderToEwin(ewin);
+ if (ewin->border == b)
+ PropagateShapes(ewin->win);
}
- if (PagersEventMouseUp(ev))
- goto exit;
-
- exit:
- if ((mode.slideout) && (pslideout))
- SlideoutHide(mode.slideout);
-
- mode.action_inhibit = 0;
- mode.justclicked = 0;
- mode.last_bpress = 0;
-
EDBUG_RETURN_;
}
-void
-HandleMouseIn(XEvent * ev)
-{
- Window win = ev->xcrossing.window;
-
- EDBUG(5, "HandleMouseIn");
-
- if (mode.mode != MODE_NONE)
- EDBUG_RETURN_;
-
- if (win == root.win)
- goto exit;
-
- mode.context_win = win;
-
- TooltipsHandleEvent();
- EdgeHandleEnter(ev);
-
- if (PagersEventMouseIn(ev))
- goto exit;
-
- if (MenusEventMouseIn(ev))
- goto exit;
-
- if ( /*!clickmenu && */ BordersEventMouseIn(ev))
- goto exit;
-
- if (ButtonsEventMouseIn(ev))
- goto exit;
-
- if (DialogEventMouseIn(ev))
- goto exit;
-
- exit:
- FocusHandleEnter(ev);
-
- EDBUG_RETURN_;
-}
+#ifdef USE_XRANDR
+#include <X11/extensions/Xrandr.h>
void
-HandleMouseOut(XEvent * ev)
+HandleScreenChange(XEvent * evx)
{
- Window win = ev->xcrossing.window;
-
- EDBUG(5, "HandleMouseOut");
-
- if (mode.mode != MODE_NONE)
- EDBUG_RETURN_;
-
- TooltipsHandleEvent();
- EdgeHandleLeave(ev);
-
- mode.context_win = win;
+ XRRScreenChangeNotifyEvent *ev = (XRRScreenChangeNotifyEvent *) evx;
- if (PagersEventMouseOut(ev))
- goto exit;
+ EDBUG(5, "HandleScreenChange");
- if (MenusEventMouseOut(ev))
- goto exit;
-
- if ( /*!clickmenu && */ BordersEventMouseOut(ev))
- goto exit;
-
- if (ButtonsEventMouseOut(ev))
- goto exit;
-
- if (DialogEventMouseOut(ev))
- goto exit;
-
- exit:
- FocusHandleLeave(ev);
+ DialogOK("Wheee! (RRScreenChangeNotify)",
+ "Screen size changed to\n%dx%d pixels (%dx%d millimeters)",
+ ev->width, ev->height, ev->mwidth, ev->mheight);
EDBUG_RETURN_;
}
+#endif
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -3 -r1.116 -r1.117
--- setup.c 11 Mar 2004 23:44:19 -0000 1.116
+++ setup.c 13 Mar 2004 22:49:48 -0000 1.117
@@ -194,9 +194,6 @@
/* set up a handler for when the X Connection goes down */
XSetIOErrorHandler((XIOErrorHandler) HandleXIOError);
- /* initialise event handling */
- EventsInit();
-
/* initialise imlib */
#if USE_IMLIB2
root.win = DefaultRootWindow(disp);
@@ -259,6 +256,9 @@
root.w = DisplayWidth(disp, root.scr);
root.h = DisplayHeight(disp, root.scr);
+ /* Initialise event handling */
+ EventsInit();
+
/* just in case - set them up again */
/* set up an error handler for then E would normally have fatal X errors */
XSetErrorHandler((XErrorHandler) EHandleXError);
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs