client_t *c = n->client;
PRINTF("fullscreen %X: %s\n", c->window, BOOLSTR(value));
- put_status(SBSC_MASK_WINDOW_FULLSCREEN, "window_fullscreen %s 0x%X\n", ONOFFSTR(value), c->window);
+ put_status(SBSC_MASK_WINDOW_STATE, "window_state fullscreen %s 0x%X\n", ONOFFSTR(value), c->window);
c->fullscreen = value;
if (value)
n->client->urgent = value;
window_draw_border(n, d->focus == n, m == mon);
- put_status(SBSC_MASK_WINDOW_URGENT, "window_urgent %s 0x%X\n", ONOFFSTR(value), n->client->window);
+ put_status(SBSC_MASK_WINDOW_STATE, "window_state urgent %s 0x%X\n", ONOFFSTR(value), n->client->window);
put_status(SBSC_MASK_REPORT);
}
void query_pointer(xcb_window_t *win, xcb_point_t *pt)
{
+ window_lower(motion_recorder);
+
xcb_query_pointer_reply_t *qpr = xcb_query_pointer_reply(dpy, xcb_query_pointer(dpy, root), NULL);
if (qpr != NULL) {
*pt = (xcb_point_t) {qpr->root_x, qpr->root_y};
free(qpr);
}
-}
-bool window_focus(xcb_window_t win)
-{
- coordinates_t loc;
- if (locate_window(win, &loc)) {
- if (loc.node != mon->desk->focus)
- focus_node(loc.monitor, loc.desktop, loc.node);
- return true;
- }
- return false;
+ window_raise(motion_recorder);
}
void window_border_width(xcb_window_t win, uint32_t bw)
update_input_focus();
}
+void enable_motion_recorder(void)
+{
+ PUTS("motion recorder on");
+ window_raise(motion_recorder);
+ window_show(motion_recorder);
+}
+
+void disable_motion_recorder(void)
+{
+ PUTS("motion recorder off");
+ window_hide(motion_recorder);
+}
+
+void update_motion_recorder(void)
+{
+ xcb_get_geometry_reply_t *geo = xcb_get_geometry_reply(dpy, xcb_get_geometry(dpy, root), NULL);
+
+ if (geo != NULL) {
+ window_resize(motion_recorder, geo->width, geo->height);
+ PRINTF("update motion recorder size: %ux%u\n", geo->width, geo->height);
+ }
+
+ free(geo);
+}
+
void update_input_focus(void)
{
set_input_focus(mon->desk->focus);
{
int16_t cx = r.x + r.width / 2;
int16_t cy = r.y + r.height / 2;
+ window_lower(motion_recorder);
xcb_warp_pointer(dpy, XCB_NONE, root, 0, 0, 0, 0, cx, cy);
+ window_raise(motion_recorder);
}
void get_atom(char *name, xcb_atom_t *atom)