~ubuntu-branches/ubuntu/oneiric/cairo-dock/oneiric-201110111206

« back to all changes in this revision

Viewing changes to src/cairo-dock-X-utilities.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2009-06-20 23:46:54 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090620234654-hlg7pqvys6temuqq
Tags: 2.0.5-0ubuntu1
* New Upstream Version. (LP: #390053)
* debian/rules: 
 - Drop autoreconf call, it's fixed upstream.
 - Call dh_desktop for all desktop files.
* debian/control:
 - Add libgtkglext1-dev as depends for cairo-dock-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
static Atom s_aNetWmWindowTypeNormal;
47
47
static Atom s_aNetWmWindowTypeUtility;
48
48
static Atom s_aNetWmWindowTypeDock;
 
49
static Atom s_aNetWmIconGeometry;
49
50
static Atom s_aNetCurrentDesktop;
50
51
static Atom s_aNetDesktopViewport;
51
52
static Atom s_aNetDesktopGeometry;
70
71
        s_aNetWmWindowTypeNormal = XInternAtom (s_XDisplay, "_NET_WM_WINDOW_TYPE_NORMAL", False);
71
72
        s_aNetWmWindowTypeUtility = XInternAtom (s_XDisplay, "_NET_WM_WINDOW_TYPE_UTILITY", False);
72
73
        s_aNetWmWindowTypeDock = XInternAtom (s_XDisplay, "_NET_WM_WINDOW_TYPE_DOCK", False);
 
74
        s_aNetWmIconGeometry = XInternAtom (s_XDisplay, "_NET_WM_ICON_GEOMETRY", False);
73
75
        s_aNetCurrentDesktop = XInternAtom (s_XDisplay, "_NET_CURRENT_DESKTOP", False);
74
76
        s_aNetDesktopViewport = XInternAtom (s_XDisplay, "_NET_DESKTOP_VIEWPORT", False);
75
77
        s_aNetDesktopGeometry = XInternAtom (s_XDisplay, "_NET_DESKTOP_GEOMETRY", False);
225
227
}
226
228
 
227
229
 
228
 
static inline _cairo_dock_window_has_type (int Xid, Atom iType)
 
230
static inline gboolean _cairo_dock_window_has_type (int Xid, Atom iType)
229
231
{
230
232
        g_return_val_if_fail (Xid > 0, FALSE);
231
233
        
261
263
        g_return_if_fail (Xid > 0);
262
264
 
263
265
        gulong iIconGeometry[4] = {iX, iY, iWidth, iHeight};
264
 
 
265
 
        XChangeProperty (s_XDisplay,
266
 
                Xid,
267
 
                XInternAtom (s_XDisplay, "_NET_WM_ICON_GEOMETRY", False),
268
 
                XA_CARDINAL, 32, PropModeReplace,
269
 
                (guchar *) iIconGeometry, 4);
 
266
        
 
267
        if (iWidth == 0 || iHeight == 0)
 
268
                XDeleteProperty (s_XDisplay,
 
269
                        Xid,
 
270
                        s_aNetWmIconGeometry);
 
271
        else
 
272
                XChangeProperty (s_XDisplay,
 
273
                        Xid,
 
274
                        s_aNetWmIconGeometry,
 
275
                        XA_CARDINAL, 32, PropModeReplace,
 
276
                        (guchar *) iIconGeometry, 4);
270
277
}
271
278
 
272
279
gboolean cairo_dock_update_screen_geometry (void)