bspwm
bspwm copied to clipboard
Added _NET_WM_MOVERESIZE handling for the move case
Added _NET_WM_MOVERESIZE handling for the move case and an empty function wm_resize_node in case anyone wants to let windows resize themselves.
This change adds the ability for programs like MPV to request that they be moved, see https://github.com/baskerville/bspwm/issues/864.
Tested by doing:
make bspwm && cp bspwm /tmp/
# Switch to tty2
startx /tmp/bspwm
# launch mpv and w+m1 drag without the modifier key
I get the following warnings using GCC:
src/events.c: In function 'wm_move_resize_node':
src/events.c:355:3: warning: range expressions in switch statements are non-standard [-Wpedantic]
case XCB_EWMH_WM_MOVERESIZE_SIZE_TOPLEFT ... XCB_EWMH_WM_MOVERESIZE_SIZE_LEFT:
^~~~
src/events.c: In function 'wm_resize_node':
src/events.c:387:49: warning: unused parameter 'e' [-Wunused-parameter]
void wm_resize_node(xcb_client_message_event_t* e, coordinates_t loc)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/events.c:387:66: warning: unused parameter 'loc' [-Wunused-parameter]
void wm_resize_node(xcb_client_message_event_t* e, coordinates_t loc)
~~~~~~~~~~~~~~^~~
Hey, what's the current state of this? The patch works for me. I think having the _NET_WM_MOVERESIZE atom enabled is kinda important, at least for me :]
@deeedob I remember there being community flak about code style when I originally worked on this change, which is why it was never merged in. I have since abandoned the change and moved back to using i3
personally because I like moving client windows which make use of that atom.