Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h ecore-e16.c ecore-e16.h ewins.c ewmh.c gnome.c hints.c
Log Message:
Initial _NET_WM_ALLOWED_ACTIONS handling, cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -3 -r1.457 -r1.458
--- E.h 30 Jun 2005 12:03:26 -0000 1.457
+++ E.h 30 Jun 2005 12:09:33 -0000 1.458
@@ -1666,6 +1666,7 @@
void EWMH_SetWindowState(const EWin * ewin);
void EWMH_SetWindowBorder(const EWin * ewin);
void EWMH_SetWindowOpacity(const EWin * ewin);
+void EWMH_SetWindowMiscHints(const EWin * ewin);
void EWMH_GetWindowHints(EWin * ewin);
void EWMH_DelWindowHints(const EWin * ewin);
void EWMH_ProcessClientMessage(XClientMessageEvent * event);
@@ -1765,16 +1766,16 @@
#if ENABLE_GNOME
/* gnome.c */
void GNOME_SetCurrentDesk(void);
-void GNOME_SetEwinArea(EWin * ewin);
void GNOME_SetDeskCount(void);
void GNOME_SetDeskNames(void);
void GNOME_SetClientList(void);
-void GNOME_SetHint(EWin * ewin);
-void GNOME_SetEwinDesk(EWin * ewin);
+void GNOME_SetEwinDesk(const EWin * ewin);
+void GNOME_SetEwinArea(const EWin * ewin);
+void GNOME_SetHint(const EWin * ewin);
void GNOME_SetCurrentArea(void);
void GNOME_SetAreaCount(void);
void GNOME_GetHints(EWin * ewin, Atom atom_change);
-void GNOME_DelHints(EWin * ewin);
+void GNOME_DelHints(const EWin * ewin);
void GNOME_SetHints(Window win_wm_check);
void GNOME_ProcessClientMessage(XClientMessageEvent * event);
#endif
@@ -1820,16 +1821,17 @@
void HintsSetWindowName(Window win, const char *name);
void HintsSetWindowClass(Window win, const char *name,
const char *clss);
-void HintsSetWindowDesktop(EWin * ewin);
-void HintsSetWindowArea(EWin * ewin);
-void HintsSetWindowState(EWin * ewin);
-void HintsSetWindowOpacity(EWin * ewin);
-void HintsSetWindowHints(EWin * ewin);
-void HintsSetWindowBorder(EWin * ewin);
+void HintsSetWindowDesktop(const EWin * ewin);
+void HintsSetWindowArea(const EWin * ewin);
+void HintsSetWindowState(const EWin * ewin);
+void HintsSetWindowOpacity(const EWin * ewin);
+void HintsSetWindowMiscHints(const EWin * ewin);
+void HintsSetWindowBorder(const EWin * ewin);
void HintsGetWindowHints(EWin * ewin);
-void HintsDelWindowHints(EWin * ewin);
+void HintsDelWindowHints(const EWin * ewin);
void HintsProcessPropertyChange(EWin * ewin, Atom atom_change);
void HintsProcessClientMessage(XClientMessageEvent * event);
+
void HintsSetRootHints(Window win);
void HintsSetRootInfo(Window win, Pixmap pmap,
unsigned int color);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecore-e16.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ecore-e16.c 30 Jun 2005 11:52:02 -0000 1.14
+++ ecore-e16.c 30 Jun 2005 12:09:34 -0000 1.15
@@ -827,14 +827,26 @@
Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_BELOW;
Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MOVE;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_SHADE;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_STICK;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
+
Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT;
+Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT_PARTIAL;
+
Ecore_X_Atom ECORE_X_ATOM_NET_FRAME_EXTENTS;
Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON;
#if 0 /* Not used */
-Ecore_X_Atom ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS;
-Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT_PARTIAL;
Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON_GEOMETRY;
Ecore_X_Atom ECORE_X_ATOM_NET_WM_PID;
Ecore_X_Atom ECORE_X_ATOM_NET_WM_HANDLED_ICONS;
@@ -926,14 +938,30 @@
ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION =
_ATOM_GET("_NET_WM_STATE_DEMANDS_ATTENTION");
+ ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS = _ATOM_GET("_NET_WM_ALLOWED_ACTIONS");
+ ECORE_X_ATOM_NET_WM_ACTION_MOVE = _ATOM_GET("_NET_WM_ACTION_MOVE");
+ ECORE_X_ATOM_NET_WM_ACTION_RESIZE = _ATOM_GET("_NET_WM_ACTION_RESIZE");
+ ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE = _ATOM_GET("_NET_WM_ACTION_MINIMIZE");
+ ECORE_X_ATOM_NET_WM_ACTION_SHADE = _ATOM_GET("_NET_WM_ACTION_SHADE");
+ ECORE_X_ATOM_NET_WM_ACTION_STICK = _ATOM_GET("_NET_WM_ACTION_STICK");
+ ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ =
+ _ATOM_GET("_NET_WM_ACTION_MAXIMIZE_HORZ");
+ ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT =
+ _ATOM_GET("_NET_WM_ACTION_MAXIMIZE_VERT");
+ ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN =
+ _ATOM_GET("_NET_WM_ACTION_FULLSCREEN");
+ ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP =
+ _ATOM_GET("_NET_WM_ACTION_CHANGE_DESKTOP");
+ ECORE_X_ATOM_NET_WM_ACTION_CLOSE = _ATOM_GET("_NET_WM_ACTION_CLOSE");
+
ECORE_X_ATOM_NET_WM_STRUT = _ATOM_GET("_NET_WM_STRUT");
+ ECORE_X_ATOM_NET_WM_STRUT_PARTIAL = _ATOM_GET("_NET_WM_STRUT_PARTIAL");
+
ECORE_X_ATOM_NET_FRAME_EXTENTS = _ATOM_GET("_NET_FRAME_EXTENTS");
ECORE_X_ATOM_NET_WM_ICON = _ATOM_GET("_NET_WM_ICON");
#if 0 /* Not used */
- ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS = _ATOM_GET("_NET_WM_ALLOWED_ACTIONS");
- ECORE_X_ATOM_NET_WM_STRUT_PARTIAL = _ATOM_GET("_NET_WM_STRUT_PARTIAL");
ECORE_X_ATOM_NET_WM_ICON_GEOMETRY = _ATOM_GET("_NET_WM_ICON_GEOMETRY");
ECORE_X_ATOM_NET_WM_PID = _ATOM_GET("_NET_WM_PID");
ECORE_X_ATOM_NET_WM_HANDLED_ICONS = _ATOM_GET("_NET_WM_HANDLED_ICONS");
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecore-e16.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ecore-e16.h 30 Jun 2005 11:52:02 -0000 1.10
+++ ecore-e16.h 30 Jun 2005 12:09:34 -0000 1.11
@@ -160,14 +160,26 @@
extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_BELOW;
extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MOVE;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_SHADE;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_STICK;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
+
extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT;
+extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT_PARTIAL;
+
extern Ecore_X_Atom ECORE_X_ATOM_NET_FRAME_EXTENTS;
extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON;
#if 0 /* Not used */
-extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS;
-extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT_PARTIAL;
extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON_GEOMETRY;
extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_PID;
extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_HANDLED_ICONS;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -3 -r1.77 -r1.78
--- ewins.c 30 Jun 2005 11:52:02 -0000 1.77
+++ ewins.c 30 Jun 2005 12:09:34 -0000 1.78
@@ -557,7 +557,9 @@
EwinInstantShade(ewin, 1);
HintsSetWindowState(ewin);
+ HintsSetWindowMiscHints(ewin);
HintsSetWindowOpacity(ewin);
+
HintsSetClientList();
if (EventDebug(EDBUG_TYPE_EWINS))
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- ewmh.c 30 Jun 2005 11:52:02 -0000 1.74
+++ ewmh.c 30 Jun 2005 12:09:34 -0000 1.75
@@ -144,6 +144,18 @@
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_STATE_BELOW;
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_MOVE;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_SHADE;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_STICK;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
+ atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
+
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_STRUT;
atom_list[atom_count++] = ECORE_X_ATOM_NET_FRAME_EXTENTS;
atom_list[atom_count++] = ECORE_X_ATOM_NET_WM_WINDOW_OPACITY;
@@ -687,6 +699,34 @@
}
void
+EWMH_SetWindowMiscHints(const EWin * ewin)
+{
+ static Ecore_X_Atom aa[10];
+
+ /*
+ * We'll just set them all on all windows for now.
+ * Should be done a bit more selectively.
+ */
+
+ if (aa[0] == None)
+ {
+ aa[0] = ECORE_X_ATOM_NET_WM_ACTION_MOVE;
+ aa[1] = ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
+ aa[2] = ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
+ aa[3] = ECORE_X_ATOM_NET_WM_ACTION_SHADE;
+ aa[4] = ECORE_X_ATOM_NET_WM_ACTION_STICK;
+ aa[5] = ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
+ aa[6] = ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
+ aa[7] = ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
+ aa[8] = ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
+ aa[9] = ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
+ }
+
+ ecore_x_window_prop_atom_set(ewin->client.win,
+ ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS, aa, 10);
+}
+
+void
EWMH_GetWindowHints(EWin * ewin)
{
EWMH_GetWindowMisc(ewin);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/gnome.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- gnome.c 7 May 2005 11:19:58 -0000 1.48
+++ gnome.c 30 Jun 2005 12:09:34 -0000 1.49
@@ -445,7 +445,7 @@
}
void
-GNOME_SetHint(EWin * ewin)
+GNOME_SetHint(const EWin * ewin)
{
static Atom atom_set = 0;
unsigned int val;
@@ -465,7 +465,7 @@
}
void
-GNOME_SetEwinArea(EWin * ewin)
+GNOME_SetEwinArea(const EWin * ewin)
{
static Atom atom_set = 0;
unsigned int val[2];
@@ -480,7 +480,7 @@
}
void
-GNOME_SetEwinDesk(EWin * ewin)
+GNOME_SetEwinDesk(const EWin * ewin)
{
static Atom atom_set = 0;
unsigned int val;
@@ -685,9 +685,9 @@
}
void
-GNOME_DelHints(EWin * ewin)
+GNOME_DelHints(const EWin * ewin)
{
- static Atom atom_get[7] = { 0, 0, 0, 0, 0, 0, 0 };
+ static Atom atom_get[6] = { 0, 0, 0, 0, 0, 0 };
if (!atom_get[0])
{
@@ -696,8 +696,7 @@
atom_get[2] = XInternAtom(disp, XA_WIN_STATE, False);
atom_get[3] = XInternAtom(disp, XA_WIN_HINTS, False);
atom_get[4] = XInternAtom(disp, XA_WIN_APP_STATE, False);
- atom_get[5] = XInternAtom(disp, XA_WIN_WORKSPACE, False);
- atom_get[6] = XInternAtom(disp, XA_WIN_AREA, False);
+ atom_get[5] = XInternAtom(disp, XA_WIN_AREA, False);
}
XDeleteProperty(disp, ewin->client.win, atom_get[0]);
XDeleteProperty(disp, ewin->client.win, atom_get[1]);
@@ -705,7 +704,6 @@
XDeleteProperty(disp, ewin->client.win, atom_get[3]);
XDeleteProperty(disp, ewin->client.win, atom_get[4]);
XDeleteProperty(disp, ewin->client.win, atom_get[5]);
- XDeleteProperty(disp, ewin->client.win, atom_get[6]);
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- hints.c 12 Jun 2005 13:09:11 -0000 1.43
+++ hints.c 30 Jun 2005 12:09:34 -0000 1.44
@@ -161,7 +161,7 @@
}
void
-HintsSetWindowDesktop(EWin * ewin)
+HintsSetWindowDesktop(const EWin * ewin)
{
#if ENABLE_GNOME
GNOME_SetEwinDesk(ewin);
@@ -172,7 +172,7 @@
}
void
-HintsSetWindowArea(EWin * ewin __UNUSED__)
+HintsSetWindowArea(const EWin * ewin __UNUSED__)
{
#if ENABLE_GNOME
GNOME_SetEwinArea(ewin);
@@ -180,7 +180,7 @@
}
void
-HintsSetWindowState(EWin * ewin)
+HintsSetWindowState(const EWin * ewin)
{
#if ENABLE_GNOME
GNOME_SetHint(ewin);
@@ -191,7 +191,7 @@
}
void
-HintsSetWindowOpacity(EWin * ewin)
+HintsSetWindowOpacity(const EWin * ewin)
{
#if ENABLE_EWMH
EWMH_SetWindowOpacity(ewin);
@@ -199,17 +199,18 @@
}
void
-HintsSetWindowHints(EWin * ewin)
+HintsSetWindowBorder(const EWin * ewin)
{
- HintsSetWindowDesktop(ewin);
- HintsSetWindowState(ewin);
+#if ENABLE_EWMH
+ EWMH_SetWindowBorder(ewin);
+#endif
}
void
-HintsSetWindowBorder(EWin * ewin)
+HintsSetWindowMiscHints(const EWin * ewin)
{
#if ENABLE_EWMH
- EWMH_SetWindowBorder(ewin);
+ EWMH_SetWindowMiscHints(ewin);
#endif
}
@@ -233,7 +234,7 @@
*/
void
-HintsDelWindowHints(EWin * ewin)
+HintsDelWindowHints(const EWin * ewin)
{
#if ENABLE_GNOME
GNOME_DelHints(ewin);
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs