Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_border.c e_border.h e_hints.c e_hints.h 


Log Message:


support qtopia hint flags and also multiple netwm types

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.628
retrieving revision 1.629
diff -u -3 -r1.628 -r1.629
--- e_border.c  7 Mar 2008 10:35:57 -0000       1.628
+++ e_border.c  7 Mar 2008 11:51:31 -0000       1.629
@@ -419,6 +419,14 @@
                       bd->client.e.fetch.state = 1;
                    }
               }
+            /* loop to check for qtopia atoms */
+            for (i = 0; i < at_num; i++)
+              {
+                 if (atoms[i] == _QTOPIA_SOFT_MENU)
+                   bd->client.qtopia.fetch.soft_menu = 1;
+                 else if (atoms[i] == _QTOPIA_SOFT_MENUS)
+                   bd->client.qtopia.fetch.soft_menus = 1;
+              }
             free(atoms);
          }
      }
@@ -3973,6 +3981,16 @@
        bd->client.netwm.fetch.icon = 1;
        bd->changed = 1;
      }
+   else if (e->atom == _QTOPIA_SOFT_MENU)
+     {
+       bd->client.qtopia.fetch.soft_menu = 1;
+       bd->changed = 1;
+     }
+   else if (e->atom == _QTOPIA_SOFT_MENUS)
+     {
+       bd->client.qtopia.fetch.soft_menus = 1;
+       bd->changed = 1;
+     }
    /*
    else if (e->atom == ECORE_X_ATOM_NET_WM_USER_TIME)
      {
@@ -5454,6 +5472,18 @@
          }
        bd->client.netwm.fetch.strut = 0;
      }
+   if (bd->client.qtopia.fetch.soft_menu)
+     {
+       e_hints_window_qtopia_soft_menu_get(bd);
+       bd->client.qtopia.fetch.soft_menu = 0;
+       rem_change = 1;
+     }
+   if (bd->client.qtopia.fetch.soft_menus)
+     {
+       e_hints_window_qtopia_soft_menus_get(bd);
+       bd->client.qtopia.fetch.soft_menus = 0;
+       rem_change = 1;
+     }
    if (bd->changes.shape)
      {
        Ecore_X_Rectangle *rects;
@@ -6842,6 +6872,7 @@
        e_object_ref(E_OBJECT(bd));
        ecore_event_add(E_EVENT_BORDER_PROPERTY, event, 
_e_border_event_border_property_free, NULL);
      }
+   _e_border_hook_call(E_BORDER_HOOK_EVAL_END, bd);
 }
 
 static void
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -3 -r1.170 -r1.171
--- e_border.h  7 Mar 2008 10:35:58 -0000       1.170
+++ e_border.h  7 Mar 2008 11:51:31 -0000       1.171
@@ -86,6 +86,7 @@
    E_BORDER_HOOK_EVAL_POST_BORDER_ASSIGN,
    E_BORDER_HOOK_EVAL_PRE_NEW_BORDER,
    E_BORDER_HOOK_EVAL_POST_NEW_BORDER,
+   E_BORDER_HOOK_EVAL_END,
 } E_Border_Hook_Point;
 
 typedef struct _E_Border                     E_Border;
@@ -336,6 +337,16 @@
            unsigned char state : 1;
         } fetch;
       } e;
+      
+      struct {
+        struct {
+           unsigned char soft_menu : 1;
+           unsigned char soft_menus : 1;
+        } fetch;
+        
+        unsigned char soft_menu : 1;
+        unsigned char soft_menus : 1;
+      } qtopia;
 
       Ecore_X_Window_Attributes initial_attributes;
    } client;
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_hints.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -3 -r1.95 -r1.96
--- e_hints.c   7 Mar 2008 10:35:58 -0000       1.95
+++ e_hints.c   7 Mar 2008 11:51:31 -0000       1.96
@@ -3,12 +3,17 @@
  */
 #include "e.h"
 
+Ecore_X_Atom _QTOPIA_SOFT_MENU = 0;
+Ecore_X_Atom _QTOPIA_SOFT_MENUS = 0;
+
 EAPI void
 e_hints_init(void)
 {
    Ecore_X_Window *roots = NULL;
    int num;
 
+   _QTOPIA_SOFT_MENU = ecore_x_atom_get("_QTOPIA_SOFT_MENU");
+   _QTOPIA_SOFT_MENUS = ecore_x_atom_get("_QTOPIA_SOFT_MENUS");
    roots = ecore_x_window_root_list(&num);
    if (roots)
      {
@@ -1335,6 +1340,28 @@
 }
 
 EAPI void
+e_hints_window_qtopia_soft_menu_get(E_Border *bd)
+{
+   int val;
+   
+   if (ecore_x_window_prop_card32_get(bd->client.win, _QTOPIA_SOFT_MENU, &val, 
1))
+     bd->client.qtopia.soft_menu = val;
+   else
+     bd->client.qtopia.soft_menu = 0;
+}
+
+EAPI void
+e_hints_window_qtopia_soft_menus_get(E_Border *bd)
+{
+   int val;
+
+   if (ecore_x_window_prop_card32_get(bd->client.win, _QTOPIA_SOFT_MENUS, 
&val, 1))
+     bd->client.qtopia.soft_menus = val;
+   else
+     bd->client.qtopia.soft_menus = 0;
+}
+
+EAPI void
 e_hints_openoffice_gnome_fake(Ecore_X_Window root)
 {
    Ecore_X_Atom gnome_atom, string_atom;
@@ -1354,3 +1381,4 @@
    win2 = ecore_x_window_new(root, -20, -20, 1, 1);
    ecore_x_netwm_wm_identify(root, win2, "KWin");
 }
+
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_hints.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- e_hints.h   7 Jun 2006 21:42:13 -0000       1.23
+++ e_hints.h   7 Mar 2008 11:51:31 -0000       1.24
@@ -45,8 +45,14 @@
 EAPI void e_hints_window_e_state_set(E_Border *bd);
 EAPI void e_hints_window_e_state_get(E_Border *bd);
 
+EAPI void e_hints_window_qtopia_soft_menu_get(E_Border *bd);
+EAPI void e_hints_window_qtopia_soft_menus_get(E_Border *bd);
+
 EAPI void e_hints_openoffice_gnome_fake(Ecore_X_Window root);
 EAPI void e_hints_openoffice_kde_fake(Ecore_X_Window root);
-    
+
+extern EAPI Ecore_X_Atom _QTOPIA_SOFT_MENU;
+extern EAPI Ecore_X_Atom _QTOPIA_SOFT_MENUS;
+
 #endif
 #endif



-------------------------------------------------------------------------
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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to