This will still prevent touchscreens or other absolute pointers to
function correctly after switching the TTY when using a multi
screen setup. But that is still better than segfaulting.
...in preference to views and other layer surfaces (except those in the
OVERLAY layer which always go first)
Fixes issue #207 where a BOTTOM layer popup lost mouse focus when a
terminal was behind it.
The "pressed" status of the mouse button is stored per-binding, and
the first binding activated causes us to break out of the loop that
cleared the "pressed" status -- as a result, some statused weren't
cleared when another binding was activated.
The bug could be seen when clicking the maximize button on a window
and then moving the mouse: the DRAG action would continue to move
the window (unmaximizing it) even though the mouse button was no
longer held.
By moving the cursor slightly after the second press (but before
the second release) it was possible to accidentally trigger both a
DOUBLECLICK and a DRAG action. Doing this on the titlebar would
cause the window to maximize and then immediately unmaximize, which
feels very "glitchy".
As a simple fix, don't allow a press event that is triggering a
DOUBLECLICK to also trigger a DRAG (or CLICK) on the following
release event.
Note: Openbox avoids the issue by processing DOUBLECLICK on the
second release event. If the cursor moves before that, the DRAG
wins out and the DOUBLECLICK isn't processed.
Refactor view_adjust_for_layout_change() in order to:
- Use view_maximize() - otherwise the unmaximized geometry remains off
the screen.
- Avoid relying on view_apply_maximized_geometry() to handle missing
output
Issue #194
Use view_move() and view_move_resize() correctly.
view_move_resize() should only be used when the view actually changes
width and/or height, otherwise the serials might cause a delay in moving
xdg-shell clients.
Issue #201
When running nested in X11 or a wlroots compositor with the respective
environment variables WLR_X11_OUTPUTS or WLR_WL_OUTPUTS set to value >= 2,
cursors need to be mapped to the respective outputs.
Closes issue #196
Suggested-by: @Consolatis
Written-by: @johanmalm
swayidle previously used wlr-randr to enable/disable outputs, but since
commit a837fefc, this re-arranges views so is not to be used in the
context of idle system power management.
<keybind key="W-d">
<action name="Execute">
<command>dmenu_run</command>
</action>
</keybind>
When using the keybind above (in rc.xml), on the first execution of W-d
all is okay, but the second time, a "d" pressed event is sent to dmenu
resulting in a continuous "ddddddd...") which has to be stopped pressing a
key.
This behaviour started in commit 7e57b7f because release events associated
with keybinds are no longer sent to clients (before that commit, the
release event for the “d” would have been passed to dmenu, thus cancelling
the repeat).
Solves issue #176
Helped-by: @spectrum70
labwc currently doesn't handle output layout changes very well:
- Windows can end up "lost" completely offscreen
- Maximized/fullscreen windows can end up spanning multiple outputs
Currently, new_output_notify() and output_destroy_notify() contain logic
to update the cursor and force a repaint when outputs are added or
removed. This logic in fact needs to run on any output layout change,
so consolidate it into a new function, output_update_for_layout_change().
Then add a second new function, view_adjust_for_layout_change(), which
adjusts window placement to account for the new layout.
The behavior is roughly as follows:
- Normal windows that end up offscreen are centered on the closest
output (making use of the existing view_center() logic)
- Maximized windows are re-maximized on the closest output. Logic is
also added to the unmaximize step to check that the original
unmaximized position is still on-screen.
- Fullscreen windows are re-fullscreened on the same output if
possible; otherwise they are un-fullscreened.
Minimized windows don't require any special handling. Their placement
is adjusted just the same, but invisible to the user until they are
later unminimized.
There is some positioning glitch still with un-fullscreening a window
whose output has been disconnected/disabled; it can end up in an
unexpected position (but at least has the correct size and decoration).
I don't think this is due to a bug in my change per se, but perhaps the
change has exposed a bug elsewhere.
Fixes: #177
Set these two variables indepently of each other as this is cleaner and
more explicit.
In openbox <raiseOnFocus> only applies if <followMouse> is set, but there
is no need to immitate this.