/[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.18 by dreamind, Fri Feb 14 01:05:28 2003 UTC revision 1.19 by dreamind, Fri Feb 14 01:10:30 2003 UTC
# Line 251  setNetWmName (Window w, Atom a, char *va Line 251  setNetWmName (Window w, Atom a, char *va
251  #endif  #endif
252    
253          XChangeProperty (dpy, w, a, XA_STRING, 8, PropModeReplace,          XChangeProperty (dpy, w, a, XA_STRING, 8, PropModeReplace,
254                                                                           (unsigned char *) value, strlen(value));                                                                           (unsigned char *) value, strlen (value));
255  }  }
256    
257  void  void
# Line 277  getEWMHState (Window w, long *value) Line 277  getEWMHState (Window w, long *value)
277                  {                  {
278                          for (i = 0; i < items; i++)                          for (i = 0; i < items; i++)
279                                  {                                  {
280                                          char* currentName = XGetAtomName (dpy, data[i]);                                          char *currentName = XGetAtomName (dpy, data[i]);
281                                          char* configuredName = XGetAtomName (dpy, net_atoms[NET_WM_STATE_STICKY]);                                          char *configuredName =
282                                          if (equals(currentName,configuredName))                                                  XGetAtomName (dpy, net_atoms[NET_WM_STATE_STICKY]);
283                                            if (equals (currentName, configuredName))
284                                                  *value |= WIN_STATE_STICKY;                                                  *value |= WIN_STATE_STICKY;
285                                          XFree(currentName);                                          XFree (currentName);
286                                          XFree(configuredName);                                          XFree (configuredName);
287                                  }                                  }
288                          XFree (data);                          XFree (data);
289                  }                  }
# Line 319  getGnomeDesktopMargins (CARD32 * margins Line 320  getGnomeDesktopMargins (CARD32 * margins
320  }  }
321    
322  void  void
323  getNetWMStrut (Window win, CARD32* margins, CARD32* window_margins)  getNetWMStrut (Window win, CARD32 * margins, CARD32 * window_margins)
324  {  {
325          unsigned long items_read;          unsigned long items_read;
326          CARD32 *data = NULL;          CARD32 *data = NULL;
# Line 328  getNetWMStrut (Window win, CARD32* margi Line 329  getNetWMStrut (Window win, CARD32* margi
329          printf ("entering getGnomeDesktopMargins\n");          printf ("entering getGnomeDesktopMargins\n");
330  #endif  #endif
331    
332          data =          data = getPropData (win, net_atoms[NET_WM_STRUT], XA_CARDINAL, &items_read);
                 getPropData (win, net_atoms[NET_WM_STRUT], XA_CARDINAL, &items_read);  
333          if (data && items_read >= 4)          if (data && items_read >= 4)
334                  {                  {
335                          window_margins[0] = data[0];                          window_margins[0] = data[0];
# Line 352  getNetWMStrut (Window win, CARD32* margi Line 352  getNetWMStrut (Window win, CARD32* margi
352  }  }
353    
354  void  void
355  delNetWMStrut (CARD32* margins, CARD32* data)  delNetWMStrut (CARD32 * margins, CARD32 * data)
356  {  {
357  #ifdef DEBUG  #ifdef DEBUG
358          printf ("entering delNetWMStrut\n");          printf ("entering delNetWMStrut\n");
# Line 471  getPropData (Window w, Atom prop, Atom t Line 471  getPropData (Window w, Atom prop, Atom t
471                                                                                                          &after_ret, &prop_data);                                                                                                          &after_ret, &prop_data);
472                          if (prop_data && *items_ret)                          if (prop_data && *items_ret)
473                                  {                                  {
474                                          free(items_ret);                                          free (items_ret);
475                                          return prop_data;                                          return prop_data;
476                                  }                                  }
477                          else                          else
478                                  {                                  {
479                                          free(items_ret);                                          free (items_ret);
480                                          return NULL;                                          return NULL;
481                                  }                                  }
482                  }                  }

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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