Michael Cardell Widerkrantz November 11, 2011
mcwm Michael Cardell Widerkrantz November 11, 2011 History of mcwm Desktop Environments Floating or Tiling mcwm Features XCB What does a window manager do and how? Using mcwm Contact Information Outline History of mcwm Desktop Environments Floating or Tiling mcwm Features XCB What does a window manager do and how? Using mcwm Contact Information Why another window manager!? Window Managers I Have Known And Loved TWM, CTWM, fvwm, 9wm, wm2, ratpoison and evilwm. Special mention: MGR Window System. tinywm / ∗ TinyWM is written by Nick Welch <mack@incise. org >, 2005. ∗ ∗ This software is in the public domain ∗ and is provided AS IS, with NO WARRANTY. ∗ / # include <X11 / X l i b . h> #define MAX(a, b) ((a) > (b) ? (a) : (b)) i n t main ( ) f Display ∗ dpy ; Window root; XWindowAttributes attr ; XButtonEvent start ; XEvent ev ; if (!(dpy = XOpenDisplay(0x0))) return 1; root = DefaultRootWindow(dpy); XGrabKey(dpy, XKeysymToKeycode(dpy, XStringToKeysym(”F1”)) , Mod1Mask, root , True , GrabModeAsync, GrabModeAsync); XGrabButton(dpy, 1, Mod1Mask, root , True, ButtonPressMask , GrabModeAsync, GrabModeAsync, None, None); XGrabButton(dpy, 3, Mod1Mask, root , True, ButtonPressMask , GrabModeAsync, GrabModeAsync, None, None); f o r ( ; ; ) f XNextEvent(dpy, &ev); if (ev.type == KeyPress && ev.xkey.subwindow != None) XRaiseWindow(dpy, ev.xkey.subwindow); else if (ev.type == ButtonPress && ev.xbutton.subwindow != None) f XGrabPointer(dpy, ev.xbutton.subwindow, True, PointerMotionMask j ButtonReleaseMask , GrabModeAsync, GrabModeAsync, None, None, CurrentTime ); XGetWindowAttributes(dpy, ev.xbutton.subwindow, &attr ); start = ev.xbutton; g else if(ev.type == MotionNotify) f int xdiff, ydiff; while(XCheckTypedEvent(dpy, MotionNotify , &ev)); xdiff = ev.xbutton.x r o o t − s t a r t . x r o o t ; ydiff = ev.xbutton.y r o o t − s t a r t .
[Show full text]