Commit graph

816 commits

Author SHA1 Message Date
Johan Malm
f4c9d1ba9f Set node position in xdg/xwayland commit handlers
...in order to sync resize/move events to avoid left/bottom edge wobbling
when resizing with top/left resize edges
2022-02-23 22:39:57 +00:00
Johan Malm
581a2bb2f1 cursor+keyboard: chase wlroots master
Use wlr_input_device from input device base.
Use wlr_keyboard where possible.
2022-02-23 22:19:16 +00:00
Consolatis
29021dad6a xdg/xwayland: Do not destroy scene node on unmap
This prevents segfaulting when unminimizing
2022-02-23 21:47:01 +00:00
Consolatis
c2f7e0be3d debug.c: try to id important elements 2022-02-23 21:47:01 +00:00
Consolatis
17d83402ee xwayland.c: Fix xwayland views activating themself before mapping 2022-02-23 21:47:01 +00:00
Consolatis
a2523081e2 Handle 'lost' unmanaged xsurfaces + improve cursor handling 2022-02-23 21:47:01 +00:00
Consolatis
5862b65f89 Convert SSD to scene nodes 2022-02-23 21:47:01 +00:00
Consolatis
f2d40a8d69 Scene Menu 2022-02-23 21:47:01 +00:00
Johan Malm
f26b61137d layers.h: define LAB_NR_LAYERS (4) 2022-02-23 21:47:01 +00:00
Johan Malm
6488b933fa layers.c: set output->usable_area 2022-02-23 21:47:01 +00:00
Consolatis
044388a5cd Prepare to move from wlr_texture to lab_data_buffer 2022-02-23 21:47:01 +00:00
Consolatis
7ea733761b Use view->scene_tree as toplevel for view + some legwork:
desktop.c move_to_front() calls wlr_scene_node_raise_to_top
desktop.c, ssd/include.h add LAB_SSD_{OSD, MENU, LAYER_SURFACE} enums
desktop.c desktop_surface_and_view_at() -> desktop_node_and_view_at()
cursor.c reenable cursor_rebase()
cursor.c reenable button click on layer surface
2022-02-23 21:47:01 +00:00
Johan Malm
688abf7db1 Handle layers under the scene-graph API
This excludes popups.
2022-02-23 21:47:01 +00:00
Johan Malm
9fed8e0998 Handle popups under xdg-toplevels in xdg-popup.c
...to make it easier to deal them separetely from layer-shell popups
2022-02-23 21:47:01 +00:00
Johan Malm
b79744e7b0 Chase wlroots master
We need it for wlr_scene_layer_surface_v1_create()
2022-02-23 21:47:01 +00:00
Johan Malm
04ca9fbdf5 buffer: use cairo_surface_destroy()
...rather than free(buffer->data)
2022-02-23 21:47:01 +00:00
Johan Malm
f22bfc96b2 buffer: create cairo_t inside buffer_create() 2022-02-23 21:47:01 +00:00
Johan Malm
ba909e4fc7 Refactor buffer implementation to take a cairo_t
Remove buffer_drop() and just destroy it.
2022-02-23 21:47:01 +00:00
Johan Malm
ebabc066ba xwayland: in map() use wlr_scene_subsurface_tree_create() 2022-02-23 21:47:01 +00:00
Johan Malm
4593909744 osd: destroy old osd_tree children 2022-02-23 21:47:01 +00:00
Johan Malm
5934ed6682 Add debug_dump_scene()
Dump view_tree and osd_tree on calling debug-action. Example bind:

<keybind key="A-F12">
  <action name="Debug"></action>
</keybind>
2022-02-23 21:47:01 +00:00
Johan Malm
532656ad5b Use wlroots scene-graph API
Move xdg-shell and xwayland-shell surfaces to new API

Also render alt-tab on-screen-display by converting cairo-surface to
wlr_buffer
2022-02-23 21:46:48 +00:00
Johan Malm
d2552232c7 Add buffer.c to cover cairo-surface to wlr_buffer 2022-02-23 21:41:01 +00: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
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