mirror of
https://github.com/stumpwm/stumpwm.git
synced 2026-09-10 07:26:20 -04:00
Accept root-window button-presses when received for a source-window (child) that is ours.
In d5230923, mouse-grabbing was changed to bind to the actual managed
window instead of the parent window (cf. that commit for the details),
but this caused all button-presses on window decorations to become
ignored, and float groups to effectively stop working (at least as far
as moving and resizing are concerned).
This is a workaround for that problem that receives the button-press
when it is propagated to the root-window instead, as indicated by the
event child-window being our decoration window, translating the
coordinates as required.
This commit is contained in:
parent
9b5e0cfd19
commit
3b6c32deaf
|
|
@ -649,7 +649,13 @@ the window in it's frame."
|
||||||
((setf win (find-window-by-parent window (top-windows)))
|
((setf win (find-window-by-parent window (top-windows)))
|
||||||
;; The click happened on the parent window, so the coordinates are
|
;; The click happened on the parent window, so the coordinates are
|
||||||
;; correct.
|
;; correct.
|
||||||
))
|
)
|
||||||
|
((and child (setf win (find-window-by-parent child (top-windows))))
|
||||||
|
;; The click happened on the parent window but was received by
|
||||||
|
;; the root window, since the parent window does not grab
|
||||||
|
;; buttons (see commit d5230923 for details).
|
||||||
|
(setf x (- x (xlib:drawable-x child))
|
||||||
|
y (- y (xlib:drawable-y child)))))
|
||||||
(cond
|
(cond
|
||||||
((and screen (not child))
|
((and screen (not child))
|
||||||
(group-button-press (screen-current-group screen) button x y :root)
|
(group-button-press (screen-current-group screen) button x y :root)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue