Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h handlers.c setup.c
Log Message:
Simplify X-error checking.
===================================================================
RCS file: /cvs/e/e16/e/src/E.h,v
retrieving revision 1.605
retrieving revision 1.606
diff -u -3 -r1.605 -r1.606
--- E.h 23 Feb 2008 11:52:43 -0000 1.605
+++ E.h 1 Mar 2008 15:25:41 -0000 1.606
@@ -472,6 +472,7 @@
Window last_bpress2;
unsigned int last_button;
unsigned int last_keycode;
+ unsigned char last_error_code;
char double_click;
char on_screen;
#if USE_COMPOSITE
@@ -536,7 +537,6 @@
char session_start;
char startup;
char restart;
- char xselect;
char exiting;
char in_signal_handler;
char exit_now;
===================================================================
RCS file: /cvs/e/e16/e/src/handlers.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- handlers.c 30 Dec 2007 20:55:20 -0000 1.59
+++ handlers.c 1 Mar 2008 15:25:41 -0000 1.60
@@ -189,10 +189,7 @@
ev->request_code, ev->minor_code, buf);
}
- if (Mode.wm.xselect &&
- (ev->request_code == X_ChangeWindowAttributes) &&
- (ev->error_code == BadAccess))
- Mode.wm.xselect = 0;
+ Mode.events.last_error_code = ev->error_code;
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/setup.c,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -3 -r1.187 -r1.188
--- setup.c 13 Feb 2008 21:31:29 -0000 1.187
+++ setup.c 1 Mar 2008 15:25:41 -0000 1.188
@@ -154,12 +154,12 @@
EventsInit();
/* select all the root window events to start managing */
- Mode.wm.xselect = 1;
+ Mode.events.last_error_code = 0;
mask =
StructureNotifyMask | SubstructureNotifyMask | SubstructureRedirectMask;
ESelectInput(VRoot.win, mask);
ESync(0);
- if (!Mode.wm.xselect)
+ if (Mode.events.last_error_code)
{
AlertX(_("Another Window Manager is already running"),
_("OK"), NULL, NULL,
@@ -168,7 +168,6 @@
"you can successfully run Enlightenment.\n"));
EExit(1);
}
- Mode.wm.xselect = 0;
/* warn, if necessary about X version problems */
if (ProtocolVersion(disp) != 11)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs