add call to set compositor selection owner
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 8 Jan 2010 08:24:35 +0000 (08:24 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 8 Jan 2010 08:24:35 +0000 (08:24 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@44969 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_x/Ecore_X.h
src/lib/ecore_x/xlib/ecore_x_netwm.c

index 13f8557..8b2aee0 100644 (file)
@@ -1781,7 +1781,8 @@ EAPI void              ecore_x_damage_free(Ecore_X_Damage damage);
 EAPI void              ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts);
 
 EAPI int               ecore_x_screen_is_composited(int screen);
-
+EAPI void              ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win);
+       
 EAPI int               ecore_x_dpms_query(void);
 EAPI void              ecore_x_dpms_capable_get_prefetch(void);
 EAPI void              ecore_x_dpms_capable_get_fetch(void);
index 873d0e6..23edf26 100644 (file)
@@ -1517,7 +1517,7 @@ ecore_x_screen_is_composited(int screen)
    static Ecore_X_Atom atom = None;
    char                buf[32];
 
-   snprintf(buf, sizeof(buf), "_NET_WM_CM_S%d", screen);
+   snprintf(buf, sizeof(buf), "_NET_WM_CM_S%i", screen);
    if (atom == None) atom = XInternAtom(_ecore_x_disp, buf, True);
    if (atom == None) return 0;
 
@@ -1525,3 +1525,15 @@ ecore_x_screen_is_composited(int screen)
 
    return win != None;
 }
+
+EAPI void
+ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win)
+{
+   static Ecore_X_Atom atom = None;
+   char                buf[32];
+   
+   snprintf(buf, sizeof(buf), "_NET_WM_CM_S%i", screen);
+   if (atom == None) atom = XInternAtom(_ecore_x_disp, buf, True);
+   if (atom == None) return 0;
+   XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time);
+}