Consolatis
73930f7e0f
view: Refactor view destruction some more
2022-04-23 08:59:06 +01:00
Joshua Ashton
d0b9680d00
view: Refactor view destruction
...
Consolidates all of the view destruction code for xwl + xdg into one function.
Fixes several notable bugs along the way:
- Fixes a crash when alt tabbing when a selected view gets destroyed.
- Fixes the OSD not updating to reflect a view has been destroyed.
2022-04-22 01:58:52 +02:00
John Lindgren
8e1f115486
cursor: Fix "jumping opposite edges" issue when resizing
...
Commit 08c537e ("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:28:52 +01:00
Johan Malm
b23774e561
xwayland.c: fix coding style
2022-03-28 20:51:59 +01:00
Consolatis
befe66d93f
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-03-21 17:56:48 +00:00
Consolatis
067b0e8798
xwayland.c: Do not raise window if deactivating
...
Fixes #270
2022-03-21 17:15:09 +00:00
John Lindgren
08c537ebd9
xwayland: Honor size increments from WM_SIZE_HINTS
2022-03-21 09:38:05 +00:00
Consolatis
4ee9f351ea
ssd_extents: force initial manual ssd_extents update for x11 clients
2022-03-12 15:32:44 +00:00
Johan Malm
30298228e3
Rename node-descriptor.c to node.c
...
...in anticipation of adding helpers like node_view_from_node()
2022-03-02 21:07:04 +00:00
Johan Malm
bd9ac3478a
Remove src/damage.c
2022-03-01 20:54:52 +00:00
Johan Malm
2891ff245e
Add node-descriptor for wlr_scene_nodes
...
Support identification of wlr_scene_node role to enable simplification
of codebase including the avoidance of iterating over lists of
layer-surface, menuitems, and so on.
Use node-descriptors for xdg toplevels and popups
2022-02-26 22:35:51 +00:00
Consolatis
5f62f2ba99
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-25 21:51:40 +00:00
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
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
17d83402ee
xwayland.c: Fix xwayland views activating themself before mapping
2022-02-23 21:47:01 +00:00
Consolatis
5862b65f89
Convert SSD to scene nodes
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
ebabc066ba
xwayland: in map() use wlr_scene_subsurface_tree_create()
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
ARDiDo
e2cca1f040
CSD: Fix no fullscreen at startup in some applications without ssd
2022-01-29 10:44:15 -05:00
ARDiDo
7a3cd6549e
xwayland: Allow xorg applications to start in fullscreen
2022-01-24 17:57:35 -05:00
ARDiDo
dc203a28e9
Prevent views from starting in fullscreen
2022-01-05 17:02:58 -05:00
Joshua Ashton
d5532ace7a
xwayland: Implement request_activate
...
Used by Steam, for example, on the Friends and Chat button.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-12-31 07:36:25 +00:00
Joshua Ashton
5ae921d785
xwayland: Implmement request_minimize
...
This is used by Steam and other apps with client decorations.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-12-31 07:36:25 +00:00
Joshua Ashton
f393dedf3f
xwayland: Make styling of wl_signal_add consistent
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-12-31 07:36:25 +00:00
Johan Malm
34a12b3515
Fix coding style
2021-12-26 23:29:01 +00:00
bi4k8
3a29e436e5
fix crash when a minimized window closes
...
e.g., open an editor from a terminal, minimize it, then hit ^C in the terminal
simply don't unmap xdg or xwayland views if they are not currently marked as mapped
2021-12-12 19:03:03 -05:00
Joshua Ashton
3e973c92ab
interactive: Fix crash if a window is destroyed while moving it
...
Need to clean this up if it's our grabbed window!
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-12-03 18:11:31 +00:00
ARDiDo
c5b8688894
Title repainting: move call to damage_all_outputs() to view_update()
2021-11-27 14:35:27 -05:00
John Lindgren
1bd26d259a
Force repaint after window title changes
...
When a window title changed dynamically (for example when running
"cd" within an xfce4-terminal), the titlebar did not immediately
update to show the new title. (The titlebar would update as soon
as the mouse cursor moved.)
2021-11-27 14:20:37 -05:00
Johan Malm
bca57213a0
Remove min/max macros
...
...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
2021-11-26 19:16:00 +00:00
ARDiDo
6698ca7300
HiDPI: send enter and leave events to views when switching monitors
2021-11-24 17:33:10 -05:00
ARDiDo
1d92404108
HiDPI: send output_enter events to views when they open
2021-11-24 17:33:10 -05:00
Johan Malm
ff75b4cd26
xwayland.c,xdg-deco.c: fix style
2021-11-13 21:45:12 +00:00
Johan Malm
26454e3115
xwayland: clear wlr_xwayland_surface in handle_destroy
...
Avoids wlr_xwayland_surface becoming a dangling pointer if a view is not
destroyed immediately.
See swaywm/sway@215787e8
2021-10-20 20:34:47 +01:00
Joshua Ashton
0a7f1b51f7
xwayland: Implement set_decorations
...
Fixes games going between borderless and normal windowed modes.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-20 18:49:02 +01:00
Joshua Ashton
a29ffebc40
xwayland: Set view in surface data
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-20 18:49:02 +01:00
Joshua Ashton
d9b021916a
xwayland: Handle min width/height in configure
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 19:49:05 +01:00
Joshua Ashton
62123dc37e
xwayland: Implement resize event
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 18:23:15 +01:00
Joshua Ashton
2a18899689
xwayland: Implement move event
...
Closes : #81
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 18:23:15 +01:00
Joshua Ashton
a67e74670b
xwayland: Only perform top-left boundary check when using ssd
...
We don't have decorations so we shouldn't account for them.
Closes : #53
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 12:22:01 +01:00
Johan Malm
e2ae63a7cf
xdg/wayland-shell: handle set_app_id and set_class events
2021-10-16 21:50:56 +01:00
Johan Malm
e140682528
view: call wlr_foreign_toplevel_handle_v1_set_app_id() on map
...
Fix issue #74
Add view-impl.c with view_impl_map() containing common code for xdg-shell
and xwayland-shell.
2021-10-16 21:26:57 +01:00
Johan Malm
9a290feeea
desktop: simplify interface for view raise/focus
...
Split desktop_focus_view() into the following two functions:
- desktop_focus_and_activate_view()
- desktop_raise_view()
Always call view_set_activated() rather than using the private
set_activated(). This keeps the code cleaner and ensures
wlr_foreign_toplevel_handle_v1_set_activated() is called.
2021-10-16 19:44:54 +01:00
Johan Malm
70144ac113
view: add view_set_activated()
...
Call wlr_foreign_toplevel_handle_v1_set_activated() from it in support of
issue #73
2021-10-16 19:24:26 +01:00
Johan Malm
ebb632419b
*.c: add SPDX-License-Identifier
2021-09-24 21:45:48 +01:00
Johan Malm
cce3c8cda0
src/: fix coding style
2021-09-21 22:05:56 +01:00
Johan Malm
ea3ea49783
Fix more coding style violations
2021-08-25 20:45:39 +01:00
Johan Malm
7bfe350f25
view: fix impl->set_fullscreen() argument bug
2021-08-24 21:53:20 +01:00
Johan Malm
645a8e46a6
Support fullscreen mode (issue #53 )
2021-08-23 22:05:30 +01:00