/[oroborus]/oroborus/src/hints.c
ViewVC logotype

Diff of /oroborus/src/hints.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by dreamind, Fri Jan 10 20:03:21 2003 UTC revision 1.13 by dreamind, Tue Jan 28 01:56:36 2003 UTC
# Line 123  initNETHints () Line 123  initNETHints ()
123          net_atoms[NET_WORKAREA] = XInternAtom (dpy, "_NET_WORKAREA", False);          net_atoms[NET_WORKAREA] = XInternAtom (dpy, "_NET_WORKAREA", False);
124          net_atoms[NET_WM_WORKAREA] = XInternAtom (dpy, "_NET_WM_WORKAREA", False);          net_atoms[NET_WM_WORKAREA] = XInternAtom (dpy, "_NET_WM_WORKAREA", False);
125          net_atoms[NET_CLOSE_WINDOW] = XInternAtom (dpy, "_NET_CLOSE_WINDOW", False);          net_atoms[NET_CLOSE_WINDOW] = XInternAtom (dpy, "_NET_CLOSE_WINDOW", False);
126            net_atoms[NET_WM_STRUT] = XInternAtom (dpy, "_NET_WM_STRUT", False);
127          XChangeProperty (dpy, root, XInternAtom (dpy, "_NET_SUPPORTED", False),          XChangeProperty (dpy, root, XInternAtom (dpy, "_NET_SUPPORTED", False),
128                                                                           XA_ATOM, 32, PropModeReplace, (unsigned char *) net_atoms,                                                                           XA_ATOM, 32, PropModeReplace, (unsigned char *) net_atoms,
129                                                                           NET_ATOM_COUNT);                                                                           NET_ATOM_COUNT);
# Line 306  getGnomeDesktopMargins (CARD32 * margins Line 307  getGnomeDesktopMargins (CARD32 * margins
307                  }                  }
308  }  }
309    
310    void
311    getNetWMStrut (Window win, CARD32* margins, CARD32* window_margins)
312    {
313            unsigned long items_read;
314            CARD32 *data = NULL;
315    
316    #ifdef DEBUG
317            printf ("entering getGnomeDesktopMargins\n");
318    #endif
319    
320            data =
321                    getPropData (win, net_atoms[NET_WM_STRUT], XA_CARDINAL, &items_read);
322            if (data && items_read >= 4)
323                    {
324                            window_margins[0] = data[0];
325                            window_margins[1] = data[1];
326                            window_margins[2] = data[2];
327                            window_margins[3] = data[3];
328                            margins[0] += data[0];
329                            margins[1] += data[1];
330                            margins[2] += data[2];
331                            margins[3] += data[3];
332                            XFree (data);
333                    }
334            else
335                    {
336                            window_margins[0] = 0;
337                            window_margins[1] = 0;
338                            window_margins[2] = 0;
339                            window_margins[3] = 0;
340                    }
341    }
342    
343    void
344    delNetWMStrut (CARD32* margins, CARD32* data)
345    {
346    #ifdef DEBUG
347            printf ("entering delNetWMStrut\n");
348    #endif
349    
350            if (data[0] || data[1] || data[2] || data[3])
351                    {
352                            margins[0] -= data[0];
353                            margins[1] -= data[1];
354                            margins[2] -= data[2];
355                            margins[3] -= data[3];
356                    }
357    }
358    
359  void  void
360  setNetWorkarea (CARD32 * margins, int workspaces)  setNetWorkarea (CARD32 * margins, int workspaces)
361  {  {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26