Commit graph

66 commits

Author SHA1 Message Date
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
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
Johan Malm
8c96c65018 ssd: refactor in preparation for making ssd_visible_box() private
Prepare to move code from output/render functions to ssd. We want
rendering functions to just render, not calculate decoration geometry
and such like.
2021-08-22 14:12:05 +01:00
Johan Malm
77ade08158 osd: support 'alt-tab' on screen display
The osd window shows title, app_id/class and shell of all views that can
be cycled between.
2021-08-16 07:16:56 +01:00
Johan Malm
042ea266a5 Add simple foreign toplevel implementation 2021-08-05 12:18:10 +01:00
Johan Malm
526ab1ae75 view: add view_toggle_maximize() 2021-08-02 16:49:41 +01:00
Johan Malm
22f5073ebd xdg: use "usable_area" when positioning view 2021-07-21 22:04:54 +01:00
Johan Malm
69f0f68cc2 Open new views on output where cursor is 2021-07-13 21:50:02 +01:00
Johan Malm
c6ae0b5694 xwayland-shell: unmaximize on first map
...to ensure consistency with xdg-shell implementation and to avoid
padding/margin complications.
2021-07-09 21:47:51 +01:00
Johan Malm
08429c5ba3 xwayland-shell: center view on first map 2021-07-09 21:45:38 +01:00
Johan Malm
2a48f2801b Create a linked list of SSD for each view 2021-03-21 21:46:16 +00:00
Johan Malm
fc76100fd5 Add ssd.h 2021-03-21 20:54:55 +00:00
Johan Malm
a262b729df Rename deco.c ssd.c 2021-03-20 14:41:39 +00:00
Alex Bryan
5e7f2c91a3 Added basic maximize support for xdg and xwayland 2021-02-27 17:10:53 -05:00
Johan Malm
54804fd3df Implement damage tracking 2021-01-09 22:51:20 +00:00
Johan Malm
cb44f047f3 Add view_move() 2020-12-23 18:52:46 +00:00
Johan Malm
9c3159fddc xwayland: await configure before moving (issue #11) 2020-12-23 18:36:40 +00:00
Johan Malm
e0770a5672 Refactor view_move_resize() 2020-12-22 20:35:06 +00:00
Johan Malm
64b6c37e7c Sort #includes 2020-11-01 22:22:15 +00:00