Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
Tag: branch-exp
E.h borders.c ewins.c focus.c grabs.c iclass.c moveresize.c
tclass.c
Log Message:
Fixes+debug.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.314.2.50
retrieving revision 1.314.2.51
diff -u -3 -r1.314.2.50 -r1.314.2.51
--- E.h 2 Oct 2004 12:27:46 -0000 1.314.2.50
+++ E.h 2 Oct 2004 12:36:25 -0000 1.314.2.51
@@ -1692,6 +1692,7 @@
#define EDBUG_TYPE_MODULES 138
#define EDBUG_TYPE_CONFIG 139
#define EDBUG_TYPE_IPC 140
+#define EDBUG_TYPE_GRABS 141
int EventDebug(unsigned int type);
#else
#define EventDebug(type) 0
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.221.2.12
retrieving revision 1.221.2.13
diff -u -3 -r1.221.2.12 -r1.221.2.13
--- borders.c 31 Aug 2004 23:25:25 -0000 1.221.2.12
+++ borders.c 2 Oct 2004 12:36:25 -0000 1.221.2.13
@@ -924,7 +924,7 @@
int i;
long emask;
- emask = (mode) ? ~(EnterWindowMask | LeaveWindowMask) : ~((long)0);
+ emask = (mode) ? ~((long)0) : ~(EnterWindowMask | LeaveWindowMask);
for (i = 0; i < ewin->border->num_winparts; i++)
{
@@ -940,7 +940,7 @@
/*
* Border event handlers
*/
-typedef void (border_event_func_t) (XEvent * ev, EWin * ewin, int part);
+#define DEBUG_BORDER_EVENTS 0
static void
BorderWinpartEventExpose(EWinBit * wbit, XEvent * ev __UNUSED__)
@@ -960,9 +960,12 @@
EWin *ewin = wbit->ewin;
int part = wbit - ewin->bits;
- GrabPointerSet(wbit->win, ECSR_GRAB, 0);
+ GrabPointerSet(wbit->win, 0, 0);
wbit->state = STATE_CLICKED;
+#if DEBUG_BORDER_EVENTS
+ Eprintf("BorderWinpartEventMouseDown %#lx %d\n", wbit->win, wbit->state);
+#endif
BorderWinpartChange(ewin, part, 0);
if (ewin->border->part[part].aclass)
@@ -975,11 +978,16 @@
EWin *ewin = wbit->ewin;
int part = wbit - ewin->bits;
+ GrabPointerRelease();
+
if ((wbit->state == STATE_CLICKED) && (!wbit->left))
wbit->state = STATE_HILITED;
else
wbit->state = STATE_NORMAL;
wbit->left = 0;
+#if DEBUG_BORDER_EVENTS
+ Eprintf("BorderWinpartEventMouseUp %#lx %d\n", wbit->win, wbit->state);
+#endif
BorderWinpartChange(ewin, part, 0);
if (wbit->win == Mode.last_bpress && ewin->border->part[part].aclass)
@@ -992,6 +1000,9 @@
EWin *ewin = wbit->ewin;
int part = wbit - ewin->bits;
+#if DEBUG_BORDER_EVENTS
+ Eprintf("BorderWinpartEventEnter %#lx %d\n", wbit->win, wbit->state);
+#endif
if (wbit->state == STATE_CLICKED)
wbit->left = 0;
else
@@ -1009,6 +1020,10 @@
EWin *ewin = wbit->ewin;
int part = wbit - ewin->bits;
+#if DEBUG_BORDER_EVENTS
+ Eprintf("BorderWinpartEventLeave %#lx %d\n", wbit->win, wbit->state);
+#endif
+#if 0
if (wbit->state == STATE_CLICKED)
wbit->left = 1;
else
@@ -1018,6 +1033,12 @@
if (ewin->border->part[part].aclass)
EventAclass(ev, ewin, ewin->border->part[part].aclass);
}
+#else
+ wbit->left = 0;
+ wbit->state = STATE_NORMAL;
+ BorderWinpartChange(ewin, part, 0);
+ ev = NULL;
+#endif
}
#if 0 /* FIXME */
@@ -1033,18 +1054,6 @@
ev->xbutton.window = win;
}
#endif
-
- if (Mode.place)
- {
- Mode.place = 0;
- goto done;
- }
-
-#if 0
- if ( /*!Mode.menus.clicked && */ BordersEventMouseUp(ev))
- goto done;
-#endif
-
}
static void
@@ -1056,39 +1065,6 @@
return;
ev = NULL;
}
-
-static int
-BordersEvent(XEvent * ev, border_event_func_t * func)
-{
- Window win = ev->xany.window;
- EWin *const *ewins;
- int i, j, num, used = 0;
-
- ewins = EwinListGetAll(&num);
- for (i = 0; i < num; i++)
- {
- for (j = 0; j < ewins[i]->border->num_winparts; j++)
- {
- if (win == ewins[i]->bits[j].win)
- {
- func(ev, ewins[i], j);
-
- used = 1;
- goto done;
- }
- }
- }
-
- done:
-
- return used;
-}
-
-int
-BordersEventMouseOut2(XEvent * ev)
-{
- return BordersEvent(ev, BorderWinpartEventLeave2);
-}
#endif
static void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewins.c,v
retrieving revision 1.1.2.21
retrieving revision 1.1.2.22
diff -u -3 -r1.1.2.21 -r1.1.2.22
--- ewins.c 29 Sep 2004 21:13:51 -0000 1.1.2.21
+++ ewins.c 2 Oct 2004 12:36:25 -0000 1.1.2.22
@@ -28,6 +28,7 @@
(ButtonPressMask | ButtonReleaseMask | \
EnterWindowMask | LeaveWindowMask | PointerMotionMask /* | \
StructureNotifyMask */)
+
#define EWIN_CONTAINER_EVENT_MASK \
(/* ButtonPressMask | ButtonReleaseMask | */ \
/* StructureNotifyMask | ResizeRedirectMask | */ \
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.81.2.5
retrieving revision 1.81.2.6
diff -u -3 -r1.81.2.5 -r1.81.2.6
--- focus.c 26 Sep 2004 20:09:50 -0000 1.81.2.5
+++ focus.c 2 Oct 2004 12:36:25 -0000 1.81.2.6
@@ -266,7 +266,7 @@
case FOCUS_EWIN_NEW:
/* Don't chase around after the windows at startup */
- if (Mode.wm.startup)
+ if (Mode.wm.startup || Mode.doingslide)
EDBUG_RETURN_;
if (Conf.focus.all_new_windows_get_focus)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/grabs.c,v
retrieving revision 1.17.2.3
retrieving revision 1.17.2.4
diff -u -3 -r1.17.2.3 -r1.17.2.4
--- grabs.c 21 Aug 2004 09:09:20 -0000 1.17.2.3
+++ grabs.c 2 Oct 2004 12:36:25 -0000 1.17.2.4
@@ -96,7 +96,7 @@
if (Mode.grabs.pointer_grab_active)
return 1;
- ret = XGrabPointer(disp, win, True,
+ ret = XGrabPointer(disp, win, False,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
ButtonMotionMask | EnterWindowMask | LeaveWindowMask,
GrabModeAsync, GrabModeAsync, confine_to, ECsrGet(csr),
@@ -104,6 +104,8 @@
Mode.grabs.pointer_grab_window = win;
Mode.grabs.pointer_grab_active = 1;
+ if (EventDebug(EDBUG_TYPE_GRABS))
+ Eprintf("GrabPointerSet %#lx ok=%d\n", win, ret);
return ret;
}
@@ -118,6 +120,8 @@
Mode.grabs.pointer_grab_active = 0;
Mode.grabs.pointer_grab_window = None;
+ if (EventDebug(EDBUG_TYPE_GRABS))
+ Eprintf("GrabPointerRelease\n");
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v
retrieving revision 1.46.2.9
retrieving revision 1.46.2.10
diff -u -3 -r1.46.2.9 -r1.46.2.10
--- iclass.c 25 Sep 2004 16:15:16 -0000 1.46.2.9
+++ iclass.c 2 Oct 2004 12:36:25 -0000 1.46.2.10
@@ -1058,6 +1058,7 @@
if ((w < 0) || (h < 0))
EDBUG_RETURN_;
+#if 0 /* Try not using the draw queue here. */
if (Mode.queue_up)
{
DrawQueue *dq;
@@ -1086,6 +1087,7 @@
AddItem(dq, "DRAW", dq->win, LIST_TYPE_DRAW);
EDBUG_RETURN_;
}
+#endif
if (ic->external)
EDBUG_RETURN_;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.22.2.7
retrieving revision 1.22.2.8
diff -u -3 -r1.22.2.7 -r1.22.2.8
--- moveresize.c 7 Sep 2004 20:06:56 -0000 1.22.2.7
+++ moveresize.c 2 Oct 2004 12:36:25 -0000 1.22.2.8
@@ -51,8 +51,10 @@
if (Conf.movemode > 0)
ecore_x_grab();
+#if 0 /* FIXME - TBD */
GrabPointerRelease();
GrabPointerSet(VRoot.win, ECSR_ACT_MOVE, 1);
+#endif
Mode.mode = MODE_MOVE_PENDING;
Mode.constrained = constrained;
@@ -94,7 +96,10 @@
int d, num, i;
EDBUG(6, "doMoveEnd");
+
+#if 0 /* FIXME - TBD */
GrabPointerRelease();
+#endif
if (ewin && ewin != mode_moveresize_ewin)
return 0;
@@ -272,8 +277,10 @@
Mode.queue_up = 0;
+#if 0 /* FIXME - TBD */
GrabPointerRelease();
GrabPointerSet(VRoot.win, ECSR_ACT_RESIZE, 1);
+#endif
switch (hv)
{
@@ -357,7 +364,10 @@
int i;
EDBUG(0, "doResizeEnd");
+
+#if 0 /* FIXME - TBD */
GrabPointerRelease();
+#endif
if (ewin && ewin != mode_moveresize_ewin)
return 0;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/tclass.c,v
retrieving revision 1.27.2.5
retrieving revision 1.27.2.6
diff -u -3 -r1.27.2.5 -r1.27.2.6
--- tclass.c 25 Sep 2004 16:15:35 -0000 1.27.2.5
+++ tclass.c 2 Oct 2004 12:36:25 -0000 1.27.2.6
@@ -166,7 +166,6 @@
tclass->sticky_active.disabled = tclass->sticky_active.normal;
EDBUG_RETURN_;
-
}
TextClass *
@@ -426,8 +425,8 @@
void
TextclassApply(ImageClass * iclass, Window win, int w, int h, int active,
- int sticky, int state, char expose, TextClass * tclass,
- const char *text)
+ int sticky, int state, char expose __UNUSED__,
+ TextClass * tclass, const char *text)
{
EDBUG(4, "TextclassApply");
@@ -435,6 +434,7 @@
if ((!iclass) || (!tclass) || (!text) || (!win) || (w < 1) || (h < 1))
EDBUG_RETURN_;
+#if 0 /* Try not using the draw queue here. */
if (Mode.queue_up)
{
DrawQueue *dq;
@@ -468,6 +468,8 @@
AddItem(dq, "DRAW", dq->win, LIST_TYPE_DRAW);
EDBUG_RETURN_;
}
+#endif
+
XClearWindow(disp, win);
TextDraw(tclass, win, active, sticky, state, text, iclass->padding.left,
@@ -478,7 +480,6 @@
tclass->justification);
EDBUG_RETURN_;
-
}
/*
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs