bspwm icon indicating copy to clipboard operation
bspwm copied to clipboard

Added _NET_WM_MOVERESIZE handling for the move case

Open Jeffrey-P-McAteer opened this issue 4 years ago • 3 comments

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

Jeffrey-P-McAteer avatar Aug 27 '20 11:08 Jeffrey-P-McAteer

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)
                                                    ~~~~~~~~~~~~~~^~~

baskerville avatar Oct 19 '20 08:10 baskerville

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 avatar Jan 10 '23 17:01 deeedob

@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.

Jeffrey-P-McAteer avatar Jan 10 '23 22:01 Jeffrey-P-McAteer