Enlightenment CVS committal

Author  : kwo
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        Ecore_X.h ecore_x.c ecore_x_private.h ecore_x_window_prop.c 


Log Message:
Added iconification request.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- Ecore_X.h   29 Feb 2004 04:37:18 -0000      1.41
+++ Ecore_X.h   29 Mar 2004 21:10:48 -0000      1.42
@@ -627,6 +627,9 @@
 } Ecore_X_Window_State_Hint;
 
 typedef enum _Ecore_X_Window_State {
+    /** The window is iconified. */
+    ECORE_X_WINDOW_STATE_ICONIFIED,
+
     /** The window is a modal dialog box. */
     ECORE_X_WINDOW_STATE_MODAL,
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ecore_x.c   29 Feb 2004 04:29:25 -0000      1.32
+++ ecore_x.c   29 Mar 2004 21:10:48 -0000      1.33
@@ -36,7 +36,10 @@
 Atom     _ecore_x_atom_wm_command = 0;
 Atom     _ecore_x_atom_wm_icon_name = 0;
 Atom     _ecore_x_atom_wm_client_machine = 0;
+Atom     _ecore_x_atom_wm_change_state = 0;
+
 Atom     _ecore_x_atom_motif_wm_hints = 0;
+
 Atom     _ecore_x_atom_win_layer = 0;
 
 Atom     _ecore_x_atom_selection_primary = 0;
@@ -362,8 +365,12 @@
    _ecore_x_atom_wm_command               = XInternAtom(_ecore_x_disp, "WM_COMMAND", 
False);
    _ecore_x_atom_wm_icon_name             = XInternAtom(_ecore_x_disp, 
"WM_ICON_NAME", False);
    _ecore_x_atom_wm_client_machine        = XInternAtom(_ecore_x_disp, 
"WM_CLIENT_MACHINE", False);
+   _ecore_x_atom_wm_change_state          = XInternAtom(_ecore_x_disp, 
"WM_CHANGE_STATE", False);
+
    _ecore_x_atom_motif_wm_hints           = XInternAtom(_ecore_x_disp, 
"_MOTIF_WM_HINTS", False);
+
    _ecore_x_atom_win_layer                = XInternAtom(_ecore_x_disp, "_WIN_LAYER", 
False);
+
    /* This is just to be anal about naming conventions */
    _ecore_x_atom_selection_primary        = XA_PRIMARY;
    _ecore_x_atom_selection_secondary      = XA_SECONDARY;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_private.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ecore_x_private.h   29 Feb 2004 08:15:47 -0000      1.24
+++ ecore_x_private.h   29 Mar 2004 21:10:48 -0000      1.25
@@ -128,8 +128,12 @@
 extern Atom     _ecore_x_atom_wm_command;
 extern Atom     _ecore_x_atom_wm_icon_name;
 extern Atom     _ecore_x_atom_wm_client_machine;
+extern Atom     _ecore_x_atom_wm_change_state;
+
 extern Atom     _ecore_x_atom_motif_wm_hints;
+
 extern Atom     _ecore_x_atom_win_layer;
+
 extern Atom     _ecore_x_atom_net_wm_desktop;
 extern Atom     _ecore_x_atom_net_current_desktop;
 extern Atom     _ecore_x_atom_net_wm_state;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- ecore_x_window_prop.c       20 Mar 2004 10:16:22 -0000      1.38
+++ ecore_x_window_prop.c       29 Mar 2004 21:10:48 -0000      1.39
@@ -850,10 +850,22 @@
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
    xev.xclient.window = win;
-   xev.xclient.message_type = _ecore_x_atom_net_wm_state;
-   xev.xclient.format = 32;
-   xev.xclient.data.l[0] = action;
-   xev.xclient.data.l[1] = _ecore_x_window_prop_state_atom_get(state);
+
+   switch (state) {
+   case ECORE_X_WINDOW_STATE_ICONIFIED:
+      if (action != 1) /* Only "do iconify" makes sense */
+       return;
+      xev.xclient.message_type = _ecore_x_atom_wm_change_state;
+      xev.xclient.format = 32;
+      xev.xclient.data.l[0] = IconicState;
+      break;
+   default: /* The _NET_WM_STATE_... hints */
+      xev.xclient.message_type = _ecore_x_atom_net_wm_state;
+      xev.xclient.format = 32;
+      xev.xclient.data.l[0] = action;
+      xev.xclient.data.l[1] = _ecore_x_window_prop_state_atom_get(state);
+      break;
+   }
 
    XSendEvent(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp), False, 0, &xev);
 }




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to