-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement support for EWMH _NET_WM_MOVERESIZE client messages #3859
base: master
Are you sure you want to change the base?
Implement support for EWMH _NET_WM_MOVERESIZE client messages #3859
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3859 +/- ##
==========================================
+ Coverage 91.02% 91.24% +0.22%
==========================================
Files 901 928 +27
Lines 57537 59695 +2158
==========================================
+ Hits 52372 54469 +2097
- Misses 5165 5226 +61
Flags with carried forward coverage won't be shown. Click here to find out more.
|
it's adding some new api and changing several existing code branches - so would be nice to add some test |
231d334
to
6bb8d68
Compare
|
i think it was no specific reason for doing that, it just wasn't implemented that specific case, but thanks for looking into it 👍 |
also you need to do this: $ rg 'unpack.*='
tests/test-awful-rules.lua
5:local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1) i think we should eventually move that to gears.table but it is what it is now 🥲 |
bleh fixed |
seems like the failed checks are just formatting issues. should i just fix them then squash the last few commits? |
yup, exactly 👍 |
71cfc9e
to
4d6d7a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this work!
4d6d7a3
to
b3115a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
agh, if anything, i would argue that this new behaviour of locking the resizing axes is more "correct" than the existing behaviour, where moving the mouse from a side of the window towards a corner will change from a single-axis resize to a two-axis (i.e. corner) resize. i'm unsure whether this warrants a breaking behavioural change, however |
(finally...) have time to look at this. First of all, wow, this is very well implemented. Is this ready to be merged, the tests are still failing. |
there are a couple things holding this back:
i'm a bit busy right now so i haven't had time to deal with this stuff, but i'll get back to it soon™ |
b3115a4
to
f093114
Compare
what I've just pushed reintroduces the |
This PR adds support for the EWMH client message
_NET_WM_MOVERESIZE
, which allows clients to delegate mouse-based movement and resizing to the window manager. It does this by:_NET_WM_MOVERESIZE
message that emits therequest::mouse_move
,request::mouse_resize
, andrequest::mouse_cancel
signals when a client makes a corresponding request.awful.permissions
that carry out the mouse movement/resizing operations usingawful.mouse.resize
.Some implementation notes:
_NET_WM_MOVERESIZE
spec are ignored. It's unclear what they're supposed to mean and they are similarly ignored by i3 and bspwm._NET_WM_MOVERESIZE
spec mentions that a "race condition" is possible in the case where the user has already released the mouse button before the mouse movement message is processed. This is already dealt with by way ofawful.mouse.resize
cancelling the operation if the mouse button is no longer pressed.request::mouse_move
andrequest::mouse_resize
signals and theawful.mouse.client
library functionsmove
andresize
apparently do the same thing independently of each other. I could not find a way to delegate one to the other without requiring breaking API or behavioural changes, and so I elected, for the time being, to just leave them independent.I've tested this on my amd64 NixOS system on the following programs:
This should close #2140 and, by extension, #3136.