Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h borders.c focus.c iconify.c
Log Message:
Don't focus windows before they are mapped.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -3 -r1.255 -r1.256
--- E.h 26 Apr 2004 21:32:05 -0000 1.255
+++ E.h 28 Apr 2004 22:31:36 -0000 1.256
@@ -877,10 +877,11 @@
}
WinClient;
-#define EWIN_STATE_UNKNOWN 0
-#define EWIN_STATE_WITHDRAWN 1
-#define EWIN_STATE_ICONIC 2
-#define EWIN_STATE_MAPPED 3
+#define EWIN_STATE_NEW 0 /* New */
+#define EWIN_STATE_STARTUP 1 /* New - during startup */
+#define EWIN_STATE_WITHDRAWN 2
+#define EWIN_STATE_ICONIC 3
+#define EWIN_STATE_MAPPED 4
#define EWIN_TYPE_NORMAL 0x00
#define EWIN_TYPE_DIALOG 0x01
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -3 -r1.171 -r1.172
--- borders.c 23 Apr 2004 22:23:37 -0000 1.171
+++ borders.c 28 Apr 2004 22:31:36 -0000 1.172
@@ -564,6 +564,7 @@
MoveEwinToDesktopAt(ewin, ewin->desktop, x, y);
UngrabX();
IconifyEwin(ewin);
+ ewin->state = EWIN_STATE_ICONIC;
EDBUG_RETURN_;
}
@@ -593,7 +594,6 @@
MoveEwin(ewin, x, y);
RaiseEwin(ewin);
ShowEwin(ewin);
- FocusToEWin(ewin, FOCUS_EWIN_NEW);
GrabThePointer(root.win);
Mode.have_place_grab = 1;
Mode.place = 1;
@@ -646,7 +646,6 @@
ICCCM_Configure(ewin);
DetermineEwinArea(ewin);
- FocusToEWin(ewin, FOCUS_EWIN_NEW);
UngrabX();
EDBUG_RETURN_;
@@ -1223,8 +1222,11 @@
XSetWindowAttributes att;
EDBUG(5, "EwinCreate");
+
ewin = Emalloc(sizeof(EWin));
memset(ewin, 0, sizeof(EWin));
+
+ ewin->state = (Mode.startup) ? EWIN_STATE_STARTUP : EWIN_STATE_NEW;
ewin->x = -1;
ewin->y = -1;
ewin->w = -1;
@@ -1408,10 +1410,16 @@
void
EwinEventMap(EWin * ewin)
{
+ int old_state = ewin->state;
+
ewin->state = EWIN_STATE_MAPPED;
if (EventDebug(EDBUG_TYPE_EWINS))
Eprintf("EwinEventMap %#lx state=%d\n", ewin->client.win, ewin->state);
+
+ /* If first time we may want to focus it (unless during startup) */
+ if (old_state == EWIN_STATE_NEW)
+ FocusToEWin(ewin, FOCUS_EWIN_NEW);
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- focus.c 21 Apr 2004 20:51:07 -0000 1.69
+++ focus.c 28 Apr 2004 22:31:37 -0000 1.70
@@ -286,7 +286,7 @@
if (ewin->menu)
EDBUG_RETURN_;
- if (do_follow && !Mode.startup)
+ if (do_follow)
GotoDesktopByEwin(ewin);
if (!EwinIsOnScreen(ewin))
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- iconify.c 21 Apr 2004 20:51:11 -0000 1.102
+++ iconify.c 28 Apr 2004 22:31:37 -0000 1.103
@@ -286,7 +286,7 @@
EDBUG_RETURN_;
call_depth++;
- if (ewin->state != EWIN_STATE_ICONIC && ewin->state != EWIN_STATE_UNKNOWN)
+ if (ewin->state != EWIN_STATE_ICONIC)
EDBUG_RETURN_;
RemoveMiniIcon(ewin);
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs