Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h areas.c desktops.c desktops.h events.c ewins.c focus.c
setup.c
Log Message:
Shuffle stuff around to more appropriate locations.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.488
retrieving revision 1.489
diff -u -3 -r1.488 -r1.489
--- E.h 4 Sep 2005 07:27:15 -0000 1.488
+++ E.h 4 Sep 2005 12:43:12 -0000 1.489
@@ -1665,7 +1665,6 @@
/* setup.c */
void MapUnmap(int start);
void SetupX(const char *dstr);
-void RootResize(int root, int w, int h);
/* size.c */
void MaxSize(EWin * ewin, const char *resize_type);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/areas.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- areas.c 4 Sep 2005 09:56:13 -0000 1.94
+++ areas.c 4 Sep 2005 12:43:13 -0000 1.95
@@ -203,7 +203,7 @@
/* remove lots of event masks from windows.. we dont want to bother */
/* handling events as a result of our playing wiht windows */
- FocusNewDeskBegin();
+ DeskSwitchStart();
/* set the current area up in out data structs */
DeskSetCurrentArea(ax, ay);
@@ -269,7 +269,7 @@
ActionsResume();
/* re-focus on a new ewin on that new desktop area */
- FocusNewDesk();
+ DeskSwitchDone();
ModulesSignal(ESIGNAL_AREA_SWITCH_DONE, DesksGetCurrent());
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -3 -r1.177 -r1.178
--- desktops.c 4 Sep 2005 09:56:13 -0000 1.177
+++ desktops.c 4 Sep 2005 12:43:13 -0000 1.178
@@ -29,6 +29,9 @@
#include "tooltips.h"
#include "xwin.h"
#include <time.h>
+#if USE_XRANDR
+#include <X11/extensions/Xrandr.h>
+#endif
#define EDESK_EVENT_MASK \
(ButtonPressMask | ButtonReleaseMask | \
@@ -1038,6 +1041,27 @@
}
void
+DeskSwitchStart(void)
+{
+ FocusNewDeskBegin();
+
+ /* we are about to flip desktops or areas - disable enter and leave events
+ * temporarily */
+ EwinsEventsConfigure(0);
+ DesksEventsConfigure(0);
+}
+
+void
+DeskSwitchDone(void)
+{
+ /* we flipped - re-enable enter and leave events */
+ EwinsEventsConfigure(1);
+ DesksEventsConfigure(1);
+
+ FocusNewDesk();
+}
+
+void
DeskGoto(Desk * dsk)
{
if (!dsk || dsk == desks.previous)
@@ -1048,7 +1072,7 @@
ModulesSignal(ESIGNAL_DESK_SWITCH_START, NULL);
ActionsSuspend();
- FocusNewDeskBegin();
+ DeskSwitchStart();
if (dsk->num > 0)
{
@@ -1101,7 +1125,7 @@
}
ActionsResume();
- FocusNewDesk();
+ DeskSwitchDone();
ModulesSignal(ESIGNAL_DESK_SWITCH_DONE, NULL);
}
@@ -1133,9 +1157,9 @@
if (EventDebug(EDBUG_TYPE_DESKS))
Eprintf("DeskRaise(%d) current=%d\n", desk, desks.current->num);
- FocusNewDeskBegin();
+ DeskSwitchStart();
DeskEnter(dsk);
- FocusNewDesk();
+ DeskSwitchDone();
ModulesSignal(ESIGNAL_DESK_SWITCH_DONE, NULL);
@@ -1148,7 +1172,7 @@
if ((desk <= 0) || (desk >= Conf.desks.num))
return;
- FocusNewDeskBegin();
+ DeskSwitchStart();
MoveToDeskBottom(desk);
if (EventDebug(EDBUG_TYPE_DESKS))
@@ -1165,7 +1189,7 @@
EwinsMoveStickyToDesk(desks.current);
ButtonsMoveStickyToDesk(desks.current);
DesksStackingCheck();
- FocusNewDesk();
+ DeskSwitchDone();
if (Mode.mode == MODE_NONE)
ModulesSignal(ESIGNAL_DESK_SWITCH_DONE, NULL);
HintsSetCurrentDesktop();
@@ -1382,6 +1406,37 @@
DeskCheckAction(dsk, ev);
}
+static void
+DeskRootResize(int root, int w, int h)
+{
+ if (EventDebug(EDBUG_TYPE_DESKS))
+ Eprintf("DeskRootResize %d %dx%d\n", root, w, h);
+
+ if (root)
+ {
+#if 0
+ RRoot.w = DisplayWidth(disp, RRoot.scr);
+ RRoot.h = DisplayHeight(disp, RRoot.scr);
+
+ if (w != RRoot.w || h != RRoot.h)
+ Eprintf
+ ("DeskRootResize (root): Screen size mismatch: root=%dx%d
event=%dx%d\n",
+ RRoot.w, RRoot.h, w, h);
+#endif
+ RRoot.w = w;
+ RRoot.h = h;
+ }
+
+ if (w == VRoot.w && h == VRoot.h)
+ return;
+
+ EWindowSync(VRoot.win);
+ VRoot.w = w;
+ VRoot.h = h;
+
+ DesksResize(w, h);
+}
+
static ActionClass *
DeskGetAclass(void *data __UNUSED__)
{
@@ -1439,6 +1494,26 @@
case LeaveNotify:
FocusHandleLeave(NULL, ev);
break;
+
+ case MotionNotify:
+ /* Motion over desk buttons doesn't go here - We probably don't care
much. */
+ DesksSetCurrent(DesktopAt(Mode.events.x, Mode.events.y));
+ break;
+
+ case ConfigureNotify:
+ if (ev->xconfigure.window == VRoot.win)
+ DeskRootResize(0, ev->xconfigure.width, ev->xconfigure.height);
+ break;
+
+#if USE_XRANDR
+ case EX_EVENT_SCREEN_CHANGE_NOTIFY:
+ {
+ XRRScreenChangeNotifyEvent *rrev = (XRRScreenChangeNotifyEvent *) ev;
+
+ DeskRootResize(1, rrev->width, rrev->height);
+ }
+ break;
+#endif
}
DeskHandleTooltip(dsk, ev);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- desktops.h 4 Sep 2005 07:27:18 -0000 1.1
+++ desktops.h 4 Sep 2005 12:43:13 -0000 1.2
@@ -54,6 +54,8 @@
void DeskAssignBg(unsigned int desk, Background * bg);
void DeskSetBg(Desk * dsk, Background * bg, int refresh);
Desk *DesktopAt(int x, int y);
+void DeskSwitchStart(void);
+void DeskSwitchDone(void);
void DeskGoto(Desk * dsk);
void DeskGotoNum(unsigned int desk);
void StackDesktop(Desk * dsk);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- events.c 4 Sep 2005 07:27:18 -0000 1.101
+++ events.c 4 Sep 2005 12:43:13 -0000 1.102
@@ -22,7 +22,6 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
-#include "desktops.h" /* FIXME - Should not be here */
#include "emodule.h"
#include "ewins.h" /* FIXME - Should not be here */
#include "xwin.h"
@@ -193,6 +192,11 @@
case MotionNotify:
Mode.events.time = ev->xmotion.time;
+ Mode.events.px = Mode.events.x;
+ Mode.events.py = Mode.events.y;
+ ModeGetXY(ev->xmotion.root, ev->xmotion.x_root, ev->xmotion.y_root);
+
+ ActionsHandleMotion();
break;
case EnterNotify:
@@ -221,6 +225,10 @@
Mode.events.time = ev->xproperty.time;
break;
+ case ClientMessage:
+ HintsProcessClientMessage(&(ev->xclient));
+ break;
+
do_stuff:
ActionclassesEvent(ev, GetFocusEwin());
break;
@@ -252,48 +260,6 @@
SoundPlay("SOUND_BUTTON_RAISE");
ActionsEnd(NULL);
break;
-
- case MotionNotify: /* 6 */
- Mode.events.px = Mode.events.x;
- Mode.events.py = Mode.events.y;
- ModeGetXY(ev->xmotion.root, ev->xmotion.x_root, ev->xmotion.y_root);
-
- DesksSetCurrent(DesktopAt(Mode.events.x, Mode.events.y));
-
- ActionsHandleMotion();
- break;
- case EnterNotify: /* 7 */
- break;
- case LeaveNotify: /* 8 */
- break;
- case MapRequest: /* 20 */
- break;
- case ReparentNotify: /* 21 */
- break;
- case ConfigureNotify: /* 22 */
- if (ev->xconfigure.window == VRoot.win)
- RootResize(0, ev->xconfigure.width, ev->xconfigure.height);
- break;
- case ConfigureRequest: /* 23 */
- break;
- case ResizeRequest: /* 25 */
- break;
- case CirculateRequest: /* 27 */
- break;
- case PropertyNotify: /* 28 */
- break;
- case ClientMessage: /* 33 */
- HintsProcessClientMessage(&(ev->xclient));
- break;
-#if USE_XRANDR
- case EX_EVENT_SCREEN_CHANGE_NOTIFY:
- {
- XRRScreenChangeNotifyEvent *rrev = (XRRScreenChangeNotifyEvent *) ev;
-
- RootResize(1, rrev->width, rrev->height);
- }
- break;
-#endif
}
/* The new event dispatcher */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- ewins.c 4 Sep 2005 07:27:18 -0000 1.102
+++ ewins.c 4 Sep 2005 12:43:13 -0000 1.103
@@ -1873,10 +1873,6 @@
case DestroyNotify:
/* Catch clients destroyed after MapRequest but before being reparented
*/
ewin = EwinFindByClient(ev->xdestroywindow.window);
-#if 0 /* FIXME - Should not be here - Remove? */
- if (!ewin)
- ewin = EwinFindByFrame(ev->xdestroywindow.window);
-#endif
if (ewin)
EwinEventDestroy(ewin);
break;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -3 -r1.117 -r1.118
--- focus.c 4 Sep 2005 07:27:18 -0000 1.117
+++ focus.c 4 Sep 2005 12:43:13 -0000 1.118
@@ -466,37 +466,17 @@
focus_pending_ewin = focus_pending_new = NULL;
}
-static int focus_new_desk_nesting = 0; /* Obsolete? */
-
void
FocusNewDeskBegin(void)
{
- if (focus_new_desk_nesting++)
- return;
-
FocusToEWin(NULL, FOCUS_DESK_LEAVE);
-
- /* we are about to flip desktops or areas - disable enter and leave events
- * temporarily */
- EwinsEventsConfigure(0);
- DesksEventsConfigure(0);
}
void
FocusNewDesk(void)
{
- EWin *ewin;
-
- if (--focus_new_desk_nesting)
- return;
-
- /* we flipped - re-enable enter and leave events */
- EwinsEventsConfigure(1);
- DesksEventsConfigure(1);
-
/* Set the mouse-over window */
- ewin = GetEwinByCurrentPointer();
- Mode.mouse_over_ewin = ewin;
+ Mode.mouse_over_ewin = GetEwinByCurrentPointer();
FocusToEWin(NULL, FOCUS_DESK_ENTER);
}
@@ -504,14 +484,11 @@
static void
FocusInit(void)
{
- EWin *ewin;
-
/* Start focusing windows */
FocusEnable(1);
/* Set the mouse-over window */
- ewin = GetEwinByCurrentPointer();
- Mode.mouse_over_ewin = ewin;
+ Mode.mouse_over_ewin = GetEwinByCurrentPointer();
focus_pending_why = 0;
focus_pending_ewin = focus_pending_new = NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -3 -r1.166 -r1.167
--- setup.c 4 Sep 2005 07:27:20 -0000 1.166
+++ setup.c 4 Sep 2005 12:43:13 -0000 1.167
@@ -22,7 +22,6 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
-#include "desktops.h" /* FIXME - Should not be here */
#include "ewins.h"
#include "xwin.h"
#include <signal.h>
@@ -339,34 +338,3 @@
ScreenInit();
ZoomInit();
}
-
-void
-RootResize(int root, int w, int h)
-{
- if (EventDebug(EDBUG_TYPE_DESKS))
- Eprintf("RootResize %d %dx%d\n", root, w, h);
-
- if (root)
- {
-#if 0
- RRoot.w = DisplayWidth(disp, RRoot.scr);
- RRoot.h = DisplayHeight(disp, RRoot.scr);
-
- if (w != RRoot.w || h != RRoot.h)
- Eprintf
- ("RootResize (root): Screen size mismatch: root=%dx%d
event=%dx%d\n",
- RRoot.w, RRoot.h, w, h);
-#endif
- RRoot.w = w;
- RRoot.h = h;
- }
-
- if (w == VRoot.w && h == VRoot.h)
- return;
-
- EWindowSync(VRoot.win);
- VRoot.w = w;
- VRoot.h = h;
-
- DesksResize(w, h);
-}
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs