Commit graph

882 commits

Author SHA1 Message Date
Johan Malm
fe237ea480 build: bump version to 0.5.1 2022-04-08 21:44:37 +01:00
John Lindgren
a50d27c770 cursor: Fix "jumping opposite edges" issue when resizing.
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.
2022-04-04 17:30:20 +01:00
John Lindgren
ec68806354 xwayland: Honor size increments from WM_SIZE_HINTS 2022-03-20 21:22:14 +00:00
Consolatis
03826a1348 xwayland.c: Do not raise window if deactivating
Fixes #270
2022-03-12 14:23:22 +00:00
Consolatis
a52feadaa7 Restore Drag mouse bindings and proper double click
Fixes #258 and #259

Reported-by: @ahmadraniri1994
Reported-by: @01micko
Suggested-by: bi4k8 <bi4k8@github>
2022-02-27 22:18:41 +00:00
Consolatis
1d9c9d1afc Implement cursor input for overlay popups 2022-02-26 20:27:43 +00:00
Johan Malm
ce38d2dbd6 cursor: add cursor_update_focus()
...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>
2022-02-26 20:23:55 +00:00
Consolatis
841b6550a9 xwayland.c: Fix positioning with multiple queued configure events
Prevents a single action like ToggleDecorations + ToggleMaximize to
position the view somewhere with negative coordinates when unmaximizing.

It may still position the view on negative coordinates but later commit
events will fix the position. This issue only exists on xwayland because
there are no configure serials which we could use to ignore all
repositioning until we are at the latest desired state.
2022-02-26 20:23:30 +00:00
Consolatis
00b2925461 cursor.c: Keep sending adjusted motion events while button is pressed
This allows to keep dragging a scrollbar or selecting text even when
moving outside of the window. Fixes #241
2022-02-26 20:22:49 +00:00
Consolatis
afa3eb1572 Merge branch 'master' into v0.5 2022-02-21 04:20:40 +01:00
Johan Malm
3d6e942eee README.md: add link to IRC channel 2022-02-20 15:02:53 +00:00
Johan Malm
1baf5cb9b8 README.md: fix typo (issue #248) 2022-02-20 15:02:08 +00:00
John Lindgren
7488ec53dd Implement cursor input for unmanaged XWayland surfaces
This is necessary for menus in X11 apps to work properly.
Otherwise, any region of the menu that extended out beyond the main
application window was not receiving any mouse input.

Adapted from sway's code.
2022-02-20 13:30:29 +00:00
Johan Malm
68d897e1f5 NEWS.md: add notes on 0.5.0 2022-02-18 21:54:07 +00:00
Johan Malm
b7818df434 build: bump version to 0.5.0 2022-02-18 21:24:38 +00:00
hype3
9ba2a4fd4b Update README.md 2022-02-17 18:45:41 +01:00
hype3
603280bd89 Update README.md 2022-02-17 17:45:05 +01:00
Johan Malm
588f233151 output: render overlay lay popups
This enables sfwbar popups and fixes issue #239

https://github.com/LBCrion/sfwbar
2022-02-13 09:45:42 +00:00
ARDiDo
7c437eac2f OSD: Use separate OSD texture for each output 2022-02-09 21:57:32 +00:00
ARDiDo
049b84409e OSD: Scale OSD to the largest output scale 2022-02-09 21:57:32 +00:00
Consolatis
53df672dda Reload environment on SIGHUP. Partly fixes #227 2022-02-08 06:08:12 +00:00
Johan Malm
e1328c055d wlroots.wrap: use 0.15.1 2022-02-07 16:53:37 +00:00
Michael Weiss
6a3536cdd7 build: Relax the version constraint for wlroots to accept patch releases
Patch releases only contain backwards compatible changes (mainly bug
fixes) so we want to allow them. This fixes the build with the recently
released wlroots 0.15.1 and uses the same version constraints as other
projects that depend on wlroots (e.g., Sway).
2022-02-04 21:44:54 +00:00
Consolatis
888c77c219 Add missing docs for mouse window snapping 2022-01-30 21:25:39 +00:00
Consolatis
fb09bbdd2f src/cursor.c: Reduce damage on button hover detection 2022-01-30 21:23:15 +00:00
Consolatis
413811f3a2 Use proper enum argument type for desktop_surface_and_view_at 2022-01-30 21:23:15 +00:00
Consolatis
7ecae4afce Move is_button() into src/ssd.c and make it public 2022-01-30 21:23:15 +00:00
ARDiDo
e2cca1f040 CSD: Fix no fullscreen at startup in some applications without ssd 2022-01-29 10:44:15 -05:00
Consolatis
3658c2bfb3 src/output.c: fix debug flag for full frame damage 2022-01-28 07:33:46 +00:00
Consolatis
b7b1e8064f Add WindowMenu button 2022-01-26 06:17:41 +00:00
Consolatis
759b26b5c1 Add window menu 2022-01-26 06:17:41 +00:00
Consolatis
4bc8726abd src/ssd.c: Clarify button dimension calculations 2022-01-25 20:18:51 +00:00
ARDiDo
7a3cd6549e xwayland: Allow xorg applications to start in fullscreen 2022-01-24 17:57:35 -05:00
Johan Malm
8dd3dc3e3b cursor: cursor_rebase() on mouse scroll
...to ensure that the surface under the mouse gets the focus even
if the mouse pointer has not moved.

Issue #162
2022-01-24 17:54:06 +00:00
Johan Malm
2652522a70 cursor: revert 6651d; remove cursor_update_focus()
...to ensure new windows receive keyboard focus even if the cursor is
over an existing window.

Fix issue #210
2022-01-24 17:51:54 +00:00
Liam Middlebrook
875b258602 output: Add option to preview the contents of the current cycle_view
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.
2022-01-23 16:02:54 +00:00
Consolatis
c484ab252e config/rcxml: Prevent overwriting action argument 2022-01-23 10:44:51 -05:00
Consolatis
f0a3f365e5 Centralize freeing of action lists
Reduces some code duplication and makes it easier to extend struct action
2022-01-23 10:36:04 -05:00
ARDiDo
8e9643a855 xdg: Allow wayland applications to start in fullscreen 2022-01-20 20:56:47 -05:00
Consolatis
5f27356fc1 Short term solution to prevent segfaulting on TTY switch. See #206.
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.
2022-01-18 06:06:12 +00:00
Johan Malm
92b64e9581 ssd: revert last commit
It was just not a good implementation; we need to consider xdg-shell views
as well as xwayland ones.

Issue #207
2022-01-17 21:00:52 +00:00
Johan Malm
35e24a67ec ssd: do not render resize cursors over exclusive layer-shell clients
...such as panels, even if the invisible region of a view's server-side
decoration extends over that layer-shell client.

Issue #207
2022-01-10 18:14:53 +00:00
Johan Malm
4964ecd80c desktop: correctly forward cursor motion-event to layer-popup surfaces
...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.
2022-01-10 18:08:27 +00:00
Consolatis
d9cef42721 CodeStyle 2022-01-09 06:37:39 +00:00
John Lindgren
e0264e471c view: Handle maximized view on disabled output more simply
Partially reverts commit ab07b68d7e.
2022-01-08 17:23:57 +00:00
Consolatis
87f4a60e38 Allow mouse movements to trigger SnapToEdge 2022-01-08 10:30:03 +00:00
John Lindgren
4e3a03586a cursor: More reliably clear "pressed" status of mouse bindings
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.
2022-01-08 09:31:53 +00:00
John Lindgren
7f8b7f0a56 cursor: Don't allow a DRAG action to start from a double-click
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.
2022-01-08 09:31:53 +00:00
Consolatis
ae43d4b9d1 Unmaximize on Move 2022-01-07 22:06:21 +00:00
ARDiDo
a6a923c506 mousebindings: use available resize edges first in drag actions 2022-01-07 22:05:07 +00:00