Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
943 B

  1. static Atom motifatom;
  2. void
  3. updatemotifhints(Client *c)
  4. {
  5. Atom real;
  6. int format;
  7. unsigned char *p = NULL;
  8. unsigned long n, extra;
  9. unsigned long *motif;
  10. int width, height;
  11. if (!decorhints)
  12. return;
  13. if (XGetWindowProperty(dpy, c->win, motifatom, 0L, 5L, False, motifatom,
  14. &real, &format, &n, &extra, &p) == Success && p != NULL) {
  15. motif = (unsigned long*)p;
  16. if (motif[MWM_HINTS_FLAGS_FIELD] & MWM_HINTS_DECORATIONS) {
  17. width = WIDTH(c);
  18. height = HEIGHT(c);
  19. if (motif[MWM_HINTS_DECORATIONS_FIELD] & MWM_DECOR_ALL ||
  20. motif[MWM_HINTS_DECORATIONS_FIELD] & MWM_DECOR_BORDER ||
  21. motif[MWM_HINTS_DECORATIONS_FIELD] & MWM_DECOR_TITLE)
  22. #if SETBORDERPX_PATCH
  23. c->bw = c->oldbw = c->mon->borderpx;
  24. #else
  25. c->bw = c->oldbw = borderpx;
  26. #endif // SETBORDERPX_PATCH
  27. else
  28. c->bw = c->oldbw = 0;
  29. resize(c, c->x, c->y, width - (2*c->bw), height - (2*c->bw), 0);
  30. }
  31. XFree(p);
  32. }
  33. }