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
Consolatis
413811f3a2
Use proper enum argument type for desktop_surface_and_view_at
2022-01-30 21:23:15 +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
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
Johan Malm
a47931bba2
desktop: simplify desktop_focus_and_activate_view()
...
...following view->surface checks in 295d5172
2022-01-02 15:53:05 +00:00
Joshua Ashton
295d5172d4
desktop: Fix activating unmapped views
...
This can happen sometimes in xwayland, need to guard against this.
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
Johan Malm
6651d45ed4
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.
Inspired by PR #164 - just restructured it a bit.
Suggested-by: @bi4k8
2021-12-26 22:09:41 +00:00
Johan Malm
238062a859
desktop: rename functions to increase consistency
...
...from
- desktop_raise_view()
- desktop_move_view_to_end_of_cycle()
to
- desktop_move_to_front()
- desktop_move_to_back()
2021-12-06 21:23:49 +00:00
Johan Malm
10884ca2e9
desktop: simplify desktop_move_view_to_end_of_cycle()
2021-12-06 21:07:08 +00:00
bi4k8
7b7178ebfa
move windows to back of cycle when they are minimized
2021-12-06 09:59:06 -05:00
bi4k8
347e6115e3
swallow mouse events only when bindings on Frame mouse contexts are triggered
2021-12-02 17:58:31 +00:00
Johan Malm
d50c2f2eac
Fix minor style violations
2021-11-26 19:27:50 +00:00
John Lindgren
c01d1f124c
Basic support for Move action
...
- Add Move as a default mouse binding for a Titlebar Press action
- Remove the hard-coded handling in cursor_button()
Example config snippet:
<mouse>
<context name="Titlebar">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Move"/>
</mousebind>
</context>
</mouse>
2021-11-26 18:25:04 +00:00
Johan Malm
08a54bd3f5
desktop: use correct coordinates layer_surface_at()
...
Use output coordinates rather than layout coordinates in order to
correctly handle pointer button event on multi-output setup.
2021-10-20 20:57:12 +01:00
Joshua Ashton
846ccb9eb9
action: Implement shift to go backwards in OSD
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-18 17:28:34 +01:00
Johan Malm
4d44659c08
desktop: remove deprecated functions
...
- set_activated()
- desktop_set_focus_view_only()
2021-10-16 19:53:00 +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
1e4598cdce
s/desktop_view_at()/desktop_surface_and_view_at()/
...
Make is clearer what the function does.
2021-09-25 10:04:37 +01:00
Johan Malm
23f28e5082
desktop: desktop_view_at() set *surface correnctly
...
Bug introduced in 23107
2021-09-25 09:40:23 +01:00
Johan Malm
05b89691b0
desktop: fix pointer de-reference typo
...
Bug introduced in 23107
2021-09-25 08:37:24 +01:00
Johan Malm
4c66004fa8
desktop.c: fix typo to compile
2021-09-24 22:13:35 +01:00
Johan Malm
231076a58f
Simplify desktop_view_at()
2021-09-24 22:04:47 +01:00
Johan Malm
ebb632419b
*.c: add SPDX-License-Identifier
2021-09-24 21:45:48 +01:00
Johan Malm
119ef87373
s/focused_view()/desktop_focused_view()
2021-09-20 22:12:34 +01:00
Johan Malm
e4b51fc5e8
desktop.c: make topmost_mapped_view() private
2021-09-20 22:07:19 +01:00
bi4k8
815cd4aa46
define focused_view function and use it for keyboard actions
2021-09-20 21:14:24 +01:00
Johan Malm
a9042e3cde
Fix coding style following 824282dd
2021-08-25 19:59:49 +01:00
Daniel Barlow
39b1d92f9b
implement input_inhibit protocol, needed for swaylock
...
this is in "it appears to work" state, though I blindly copy-pasted a little
more code than I'm happy with, so might benefit from a review
2021-08-22 21:30:42 +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
9cf0608aba
foreign: handle minimize request
2021-08-05 13:00:34 +01:00
Johan Malm
3bc379cc08
desktop: handle missing output safely
2021-07-19 07:06:36 +01:00
Johan Malm
eaed1a3cab
action: add "Close" to close top-most view
2021-07-12 21:47:27 +01:00
Johan Malm
ee15a5fe56
cursor: handle button press on layer-surface (issue #41 )
2021-07-12 16:44:30 +01:00
Mikhail Kshevetskiy
00db22e44f
focus: add basic follow mouse support
2021-05-28 21:25:19 +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
Johan Malm
54804fd3df
Implement damage tracking
2021-01-09 22:51:20 +00:00
Johan Malm
cfc6e18cdc
Make xwayland support optional
2020-12-30 10:29:21 +00:00
Johan Malm
64b6c37e7c
Sort #includes
2020-11-01 22:22:15 +00:00
Johan Malm
5d6143449f
desktop: rename desktop_cycle_view()
2020-10-31 14:46:33 +00:00
Johan Malm
5f9c5a9d01
desktop: refactor desktop_focus_topmost_mapped_view()
...
Rename from desktop_focus_next_mapped_view() to
desktop_focus_topmost_mapped_view() and only take struct server as
argument.
2020-10-31 14:32:31 +00:00
Johan Malm
9342b2b414
seat: refactor seat_focus_surface()
2020-10-08 20:22:52 +01:00
Johan Malm
f752610e0b
desktop: refactor desktop_focus_view()
2020-10-08 20:08:41 +01:00
Johan Malm
8e2b3ea89a
seat: remove seat_focused_surface()
2020-10-07 21:49:58 +01:00
Johan Malm
e400700a4a
seat: refactor seat_focus_surface()
2020-10-06 21:31:01 +01:00
Johan Malm
50bcfa00f3
seat: use wlr_seat_keyboard_notify_enter() correctly
2020-10-05 20:27:52 +01:00
Johan Malm
25829d122c
Refactor seat.c, keyboard.c, cursor.c
...
Use wlr_keyboard_group
2020-10-02 21:20:12 +01:00
Johan Malm
53b360dd11
Tiny .clang-format tweak
2020-09-28 21:35:18 +01:00