return resize_graphical_handler(conn, ws, first, second, orientation, event);
}
return resize_graphical_handler(conn, ws, first, second, orientation, event);
}
- DLOG("Button %d pressed\n", event->state);
- /* This was either a focus for a client’s parent (= titlebar)… */
- Client *client = table_get(&by_child, event->event);
+ Con *con;
+ LOG("Button %d pressed\n", event->state);
+
+ con = con_by_window_id(event->event);
/* See if this was a click with the configured modifier. If so, we need
* to move around the client if it was floating. if not, we just process
* as usual. */
/* See if this was a click with the configured modifier. If so, we need
* to move around the client if it was floating. if not, we just process
* as usual. */
- if (config.floating_modifier != 0 &&
- (event->state & config.floating_modifier) == config.floating_modifier) {
- if (client == NULL) {
- DLOG("Not handling, floating_modifier was pressed and no client found\n");
+ //if (config.floating_modifier != 0 &&
+ //(event->state & config.floating_modifier) == config.floating_modifier) {
+ if (con == NULL) {
+ LOG("Not handling, floating_modifier was pressed and no client found\n");
- if (client_is_floating(client)) {
- DLOG("button %d pressed\n", event->detail);
+#endif
+ if (con->type == CT_FLOATING_CON) {
+ LOG("button %d pressed\n", event->detail);
- DLOG("left mouse button, dragging\n");
- floating_drag_window(conn, client, event);
- } else if (event->detail == 3) {
+ LOG("left mouse button, dragging\n");
+ floating_drag_window(con, event);
+ }
+#if 0
+ else if (event->detail == 3) {
bool proportional = (event->state & BIND_SHIFT);
DLOG("right mouse button\n");
floating_resize_window(conn, client, proportional, event);
}
bool proportional = (event->state & BIND_SHIFT);
DLOG("right mouse button\n");
floating_resize_window(conn, client, proportional, event);
}
if (!floating_mod_on_tiled_client(conn, client, event)) {
xcb_allow_events(conn, XCB_ALLOW_REPLAY_POINTER, event->time);
xcb_flush(conn);
}
if (!floating_mod_on_tiled_client(conn, client, event)) {
xcb_allow_events(conn, XCB_ALLOW_REPLAY_POINTER, event->time);
xcb_flush(conn);
}
if (client == NULL) {
/* The client was neither on a client’s titlebar nor on a client itself, maybe on a stack_window? */
if (button_press_stackwin(conn, event))
if (client == NULL) {
/* The client was neither on a client’s titlebar nor on a client itself, maybe on a stack_window? */
if (button_press_stackwin(conn, event))
}
return resize_graphical_handler(conn, ws, first, second, orientation, event);
}
return resize_graphical_handler(conn, ws, first, second, orientation, event);