This is needed to allow X11 applications to create surfaces as
non-override_redirect and then change them to override_redirect later
Without this gitk-menus and rofi are treated as xwayland-views with
associated server-side-decoration and forced positioning.
Backport of 81f216b6a2
Instead of using the stored view for comparison use the actual surface.
Before this patch, there were situations where the branch intended for
out-of-window text selection / scrollbar dragging was used even though
the cursor never left the surface.
Partly fixes#340Fixes#347
Backport of 6dd290afc9
Commit ec68806354 ("xwayland: Honor size increments from
WM_SIZE_HINTS") adjusted only the window width/height according
to the size hints. If resizing from the top or left edge of the
window, we also need to adjust the window position to keep the
bottom or right edge from jumping around.
...and call it from desktop_move_to_front() in order force an enter event
on the surface below the cursor when cycling views.
Fixes#162 and #225
Inspired by PR #164 - just restructured it a bit.
Suggested-by: @bi4k8
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
Add the 'cycleViewPreview.core' option to rc.xml to enable previews of
the selected view when cycling between windows. Default this option to
be disabled to match current behavior.
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
<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
...and call it from desktop_move_to_front() in order force an enter event
on the surface below the cursor when cycling views.
Inspired by PR #164 - just restructured it a bit.
Suggested-by: @bi4k8
Issue arises when using the default config from docs/rc.xml.all.
Without this patch only the last action defined inside a <mousebind>
will have an effect.
Without a config or when defining the same <mousebind> multiple times
with each containing only a single <action> the issue does not exist.
If we don't switch focus, we want the close button to close the window associated with it, not the current focus window.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
cursor_rebase() sets the cursor icon and sends a motion-event to the
surface below the cursor. It is made public in anticipation of using it
in various view_* functions.
...and replace with a local MAX macro, because:
- They contain a ({}) construct which is a GNU extension and that's
against Drew's coding style
- min() is not used anyway
- MAX() clashes with cairo's macro, so best to not add this in labwc.h