- button_return = XKeysymToKeycode(ob_display, XStringToKeysym("Return"));
- button_escape = XKeysymToKeycode(ob_display, XStringToKeysym("Escape"));
- button_left = XKeysymToKeycode(ob_display, XStringToKeysym("Left"));
- button_right = XKeysymToKeycode(ob_display, XStringToKeysym("Right"));
- button_up = XKeysymToKeycode(ob_display, XStringToKeysym("Up"));
- button_down = XKeysymToKeycode(ob_display, XStringToKeysym("Down"));
+ XSetWindowAttributes attrib;
+ XGCValues gcv;
+
+ popup = popup_new(FALSE);
+ popup_size_to_string(popup, "W: 0000 W: 0000");
+
+ attrib.save_under = True;
+ opaque_window.win = XCreateWindow(ob_display, ob_root, 0, 0, 1, 1, 0,
+ RrDepth(ob_rr_inst), InputOutput,
+ RrVisual(ob_rr_inst),
+ CWSaveUnder, &attrib);
+ stacking_add(INTERNAL_AS_WINDOW(&opaque_window));
+ stacking_raise(INTERNAL_AS_WINDOW(&opaque_window));
+
+ /* a GC to invert stuff */
+ gcv.function = GXxor;
+ gcv.line_width = ob_rr_theme->bwidth;
+ gcv.foreground = (WhitePixel(ob_display, ob_screen) ^
+ BlackPixel(ob_display, ob_screen));
+ opaque_gc = XCreateGC(ob_display, opaque_window.win,
+ GCFunction | GCForeground | GCLineWidth, &gcv);
+}
+
+void moveresize_shutdown()
+{
+ popup_free(popup);
+ popup = NULL;
+ stacking_remove(&opaque_window);
+ XFreeGC(ob_display, opaque_gc);
+ XDestroyWindow(ob_display, opaque_window.win);