Advertisement
Guest User

Untitled

a guest
Nov 19th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. --- copy-dwm.c 2012-11-19 23:07:38.406816000 +0530
  2. +++ dwm.c 2012-11-19 23:36:52.259389209 +0530
  3. @@ -87,7 +87,7 @@
  4. enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
  5. enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
  6. enum { NetSupported, NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation,
  7. - NetWMName, NetWMState, NetWMFullscreen, NetActiveWindow, NetWMWindowType,
  8. + NetWMName, NetWMState, NetWMFullscreen, NetWMWindowsOpacity, NetActiveWindow, NetWMWindowType,
  9. NetWMWindowTypeDialog, NetLast }; /* EWMH atoms */
  10. enum { Manager, Xembed, XembedInfo, XLast }; /* Xembed atoms */
  11. enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
  12. @@ -1849,6 +1849,7 @@ setup(void) {
  13. xatom[Manager] = XInternAtom(dpy, "MANAGER", False);
  14. xatom[Xembed] = XInternAtom(dpy, "_XEMBED", False);
  15. xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False);
  16. + netatom[NetWMWindowsOpacity] = XInternAtom(dpy, "_NET_WM_WINDOW_OPACITY", False);
  17. /* init cursors */
  18. cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr);
  19. cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing);
  20. @@ -2133,6 +2134,10 @@ updatebars(void) {
  21. m->barwin = XCreateWindow(dpy, root, m->wx, m->by, w, bh, 0, DefaultDepth(dpy, screen),
  22. CopyFromParent, DefaultVisual(dpy, screen),
  23. CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
  24. + unsigned long real_opacity[] = { opacity * 0xffffffff };
  25. + XChangeProperty(dpy, m->barwin, netatom[NetWMWindowsOpacity], XA_CARDINAL,
  26. + 32, PropModeReplace, (unsigned char *)real_opacity,
  27. + 1);
  28. XDefineCursor(dpy, m->barwin, cursor[CurNormal]);
  29. XMapRaised(dpy, m->barwin);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement