- if (direction == _NET_WM_MOVERESIZE_MOVE) {
- floating_drag_window(con->parent, &fake);
- } else if (direction >= _NET_WM_MOVERESIZE_SIZE_TOPLEFT && direction <= _NET_WM_MOVERESIZE_SIZE_LEFT) {
- floating_resize_window(con->parent, FALSE, &fake);
- } else {
- DLOG("_NET_WM_MOVERESIZE direction %d not implemented\n", direction);
+ switch (direction) {
+ case _NET_WM_MOVERESIZE_MOVE:
+ floating_drag_window(con->parent, &fake);
+ break;
+ case _NET_WM_MOVERESIZE_SIZE_TOPLEFT... _NET_WM_MOVERESIZE_SIZE_LEFT:
+ floating_resize_window(con->parent, false, &fake);
+ break;
+ default:
+ DLOG("_NET_WM_MOVERESIZE direction %d not implemented\n", direction);
+ break;
+ }
+ } else if (event->type == A__NET_MOVERESIZE_WINDOW) {
+ DLOG("Received _NET_MOVE_RESIZE_WINDOW. Handling by faking a configure request.\n");
+
+ void *_generated_event = scalloc(32, 1);
+ xcb_configure_request_event_t *generated_event = _generated_event;
+
+ generated_event->window = event->window;
+ generated_event->response_type = XCB_CONFIGURE_REQUEST;
+
+ generated_event->value_mask = 0;
+ if (event->data.data32[0] & _NET_MOVERESIZE_WINDOW_X) {
+ generated_event->value_mask |= XCB_CONFIG_WINDOW_X;
+ generated_event->x = event->data.data32[1];
+ }
+ if (event->data.data32[0] & _NET_MOVERESIZE_WINDOW_Y) {
+ generated_event->value_mask |= XCB_CONFIG_WINDOW_Y;
+ generated_event->y = event->data.data32[2];
+ }
+ if (event->data.data32[0] & _NET_MOVERESIZE_WINDOW_WIDTH) {
+ generated_event->value_mask |= XCB_CONFIG_WINDOW_WIDTH;
+ generated_event->width = event->data.data32[3];