Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h ewins.c ewmh.c focus.c icccm.c
Log Message:
Initial urgency and DEMANDS_ATTENTION support.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.445
retrieving revision 1.446
diff -u -3 -r1.445 -r1.446
--- E.h 2 Jun 2005 17:44:41 -0000 1.445
+++ E.h 2 Jun 2005 22:10:57 -0000 1.446
@@ -656,10 +656,11 @@
Colormap cmap;
Window icon_win;
Pixmap icon_pmap, icon_mask;
- char start_iconified;
Window group;
Window client_leader;
+ char start_iconified;
char need_input;
+ char urgency;
char take_focus;
char delete_window;
signed char transient;
@@ -766,6 +767,7 @@
unsigned maximized_vert:1;
unsigned fullscreen:1;
unsigned showingdesk:1; /* Iconified by show desktop */
+ unsigned attention:1;
} st;
struct
{
@@ -1576,6 +1578,7 @@
#define EWIN_CHANGE_DESKTOP (1<<3)
#define EWIN_CHANGE_LAYER (1<<4)
#define EWIN_CHANGE_OPACITY (1<<5)
+#define EWIN_CHANGE_ATTENTION (1<<6)
void EwinShapeSet(EWin * ewin);
void EwinFloatAt(EWin * ewin, int x, int y);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- ewins.c 29 May 2005 23:48:08 -0000 1.70
+++ ewins.c 2 Jun 2005 22:11:07 -0000 1.71
@@ -1606,6 +1606,11 @@
SnapshotEwinUpdate(ewin, SNAP_USE_OPACITY);
}
+ if (EWinChanges.flags & EWIN_CHANGE_ATTENTION)
+ {
+ HintsSetWindowState(ewin);
+ }
+
EWinChanges.flags = 0;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- ewmh.c 7 May 2005 11:19:57 -0000 1.70
+++ ewmh.c 2 Jun 2005 22:11:08 -0000 1.71
@@ -142,9 +142,7 @@
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN;
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_STATE_ABOVE;
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_STATE_BELOW;
-#if 0
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
-#endif
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_STRUT;
atom_list[atom_count++] = ECORE_X_ATOM_NET_FRAME_EXTENTS;
@@ -383,10 +381,10 @@
EoGetLayer(ewin) >= 6);
atom_list_set(atom_list, len, &atom_count, ECORE_X_ATOM_NET_WM_STATE_BELOW,
EoGetLayer(ewin) <= 2);
-#if 0
atom_list_set(atom_list, len, &atom_count,
- ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION, TBD);
-#endif
+ ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION,
+ ewin->st.attention);
+
ecore_x_window_prop_atom_set(ewin->client.win, ECORE_X_ATOM_NET_WM_STATE,
atom_list, atom_count);
}
@@ -494,7 +492,7 @@
ewin->shaded = 0;
ewin->skiptask = ewin->skip_ext_pager = 0;
ewin->st.maximized_horz = ewin->st.maximized_vert = 0;
- ewin->st.fullscreen = 0;
+ ewin->st.fullscreen = ewin->st.attention = 0;
/* ewin->layer = No ... TBD */
for (i = 0; i < n_atoms; i++)
@@ -520,10 +518,8 @@
EoSetLayer(ewin, 6);
else if (atom == ECORE_X_ATOM_NET_WM_STATE_BELOW)
EoSetLayer(ewin, 2);
-#if 0
else if (atom == ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION)
- TBD;
-#endif
+ ewin->st.attention = 1;
}
Efree(p_atoms);
}
@@ -817,13 +813,13 @@
{
action = do_set(ewin->skiptask, action);
ewin->skiptask = action;
- /* Set ECORE_X_ATOM_NET_WM_STATE ? */
+ EWMH_SetWindowState(ewin);
}
else if (atom == ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER)
{
action = do_set(ewin->skip_ext_pager, action);
ewin->skip_ext_pager = action;
- /* Set ECORE_X_ATOM_NET_WM_STATE ? */
+ EWMH_SetWindowState(ewin);
}
else if (atom == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT ||
atom == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ)
@@ -889,11 +885,12 @@
else
EwinOpSetLayer(ewin, 4);
}
-#if 0
else if (atom == ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION)
{
+ action = do_set(ewin->st.attention, action);
+ ewin->st.attention = action;
+ EWMH_SetWindowState(ewin);
}
-#endif
}
else if (ev->message_type == ECORE_X_ATOM_NET_WM_MOVERESIZE)
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- focus.c 31 May 2005 21:11:32 -0000 1.101
+++ focus.c 2 Jun 2005 22:11:08 -0000 1.102
@@ -223,6 +223,12 @@
EwinBorderUpdateState(ewin);
FocusEwinSetGrabs(ewin);
+
+ if (active && ewin->st.attention)
+ {
+ ewin->st.attention = 0;
+ HintsSetWindowState(ewin);
+ }
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- icccm.c 21 May 2005 20:58:18 -0000 1.96
+++ icccm.c 2 Jun 2005 22:11:09 -0000 1.97
@@ -632,73 +632,47 @@
}
}
- if (hint->flags & InputHint)
- {
- if (hint->input)
- {
- ewin->client.need_input = 1;
- }
- else
- {
- ewin->client.need_input = 0;
- }
- }
- else
- {
- ewin->client.need_input = 1;
- }
+ ewin->client.need_input =
+ ((hint->flags & InputHint) && (!hint->input)) ? 0 : 1;
+
+ ewin->client.start_iconified =
+ ((hint->flags & StateHint) &&
+ (hint->initial_state == IconicState)) ? 1 : 0;
- if (hint->flags & StateHint)
+ if (hint->flags & IconPixmapHint)
{
- if (hint->initial_state == IconicState)
- {
- ewin->client.start_iconified = 1;
- }
- else
+ if (ewin->client.icon_pmap != hint->icon_pixmap)
{
- ewin->client.start_iconified = 0;
+ ewin->client.icon_pmap = hint->icon_pixmap;
+ EwinChange(ewin, EWIN_CHANGE_ICON_PMAP);
}
}
else
{
- ewin->client.start_iconified = 0;
+ ewin->client.icon_pmap = None;
}
- if (hint->flags & IconPixmapHint)
- {
- ewin->client.icon_pmap = hint->icon_pixmap;
- EwinChange(ewin, EWIN_CHANGE_ICON_PMAP);
- }
- else
- {
- ewin->client.icon_pmap = 0;
- }
+ ewin->client.icon_mask =
+ (hint->flags & IconMaskHint) ? hint->icon_mask : None;
- if (hint->flags & IconMaskHint)
- {
- ewin->client.icon_mask = hint->icon_mask;
- }
- else
- {
- ewin->client.icon_mask = 0;
- }
+ ewin->client.icon_win =
+ (hint->flags & IconWindowHint) ? hint->icon_window : None;
- if (hint->flags & IconWindowHint)
- {
- ewin->client.icon_win = hint->icon_window;
- }
- else
- {
- ewin->client.icon_win = 0;
- }
+ ewin->client.group =
+ (hint->flags & WindowGroupHint) ? hint->window_group : None;
- if (hint->flags & WindowGroupHint)
+ if (hint->flags & XUrgencyHint)
{
- ewin->client.group = hint->window_group;
+ if (!ewin->client.urgency)
+ {
+ ewin->client.urgency = 1;
+ EwinChange(ewin, EWIN_CHANGE_ATTENTION);
+ }
+ ewin->st.attention = 1;
}
else
{
- ewin->client.group = 0;
+ ewin->client.urgency = 0;
}
XFree(hint);
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs