Georges Basile Stavracas Neto
14ed29e7b2
renderer/native: Trivial variable rename
...
Rename 'format' to 'drm_format' to not clash with following
commits.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3175 >
2023-08-19 23:00:28 -03:00
Sebastian Keller
73bc074917
core: Destroy the correct opaque region when destroying a frame
...
Freeing the window opaque region rather than the frame one when was
leaking the frame opaque region and wrongly setting the window opaque
region to NULL.
Fixes: 82b2b7688
("core: Add infrastructure to keep window frames' opaque regions")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3188 >
2023-08-17 00:00:55 +02:00
Sebastian Keller
f57c239a26
kms/cursor-manager: Free struct in meta_kms_cursor_manager_impl_free()
...
The free function was not actually freeing anything, which was causing a
small leak.
Fixes: 6d873036e
("Add KMS cursor manager")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3188 >
2023-08-17 00:00:39 +02:00
Sebastian Keller
5fdb6a847f
kms/update: Free struct in meta_kms_crtc_color_updates_free()
...
The free function was only freeing the structs its members were pointing
to, but not the struct itself, causing a small leak.
Fixes: 0180ffdaa
("backends/native: Introduce MetaKmsCrtcColorUpdate")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3188 >
2023-08-16 21:24:28 +02:00
Sebastian Keller
193a21c601
surface-actor-wayland: Fix leak in apply_transform()
...
Using g_object_get() to get the allocation creates a copy that needs to
be freed by the caller.
Fixes: e94b52777
("surface-actor/wayland: Implement stable size and position rounding")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3188 >
2023-08-16 21:24:28 +02:00
Sebastian Keller
03ba3a825e
context: Fix a small leak in meta_context_main_get_x11_display_policy()
...
The caller of sd_pid_get_user_unit() is supposed to free the unit name
string.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3188 >
2023-08-16 21:24:28 +02:00
Carlos Garnacho
90a00dae99
compositor: Handle grab state through ClutterStage::is-grabbed handler
...
This is something the compositor could now track by itself, instead of
being pushed through events. It also makes more sense to do this directly
when the grabbing conditions change, as opposed to the next event.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3185 >
2023-08-16 15:34:46 +00:00
Jonas Ådahl
0b9f5ae75b
tests: Add test case for restoring focus after overview
...
This is a test case for
https://gitlab.gnome.org/GNOME/mutter/-/issues/2690 .
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3185 >
2023-08-16 15:34:46 +00:00
Jonas Ådahl
05eeb684d1
window: Postpone focusing until grab ended if uninteractable
...
When GNOME Shell is in the overview, we don't want windows to steal
focus left and right, but once we leave the overview, we do want
whatever was mapped with "take_focus" to get focus. Do that, but after
the last grab was dismissed.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2690
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3185 >
2023-08-16 15:34:46 +00:00
Jonas Ådahl
587c31b611
tests/test-runner: Add toggle_overview
command
...
This will emit the `overlay-key` key which will be handled by the test
shell.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3185 >
2023-08-16 15:34:46 +00:00
Jonas Ådahl
8268ec2ee8
tests/test-shell: Emulate overview grabs
...
This mimics what gnome-shell does when the overview is shown. This means
having a grab active, and setting the keyboard focus to the stage
itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3185 >
2023-08-16 15:34:46 +00:00
Jonas Ådahl
524c9aa458
tests: Introduce and use a custom test shell
...
Except for the tests that launches `mutter`, use a custom shell
implementation. It's roughly a copy of default.c with some cleanups on
top. A custom shell allows for a bit more freedom when doing testy
things.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3185 >
2023-08-16 15:34:46 +00:00
Jonas Ådahl
92051d59a6
constraint: Use WxH format for size in debug logs
...
Whether W,H or +W,H means "size" or "position" is rather unclear; fix
that by formating size as WxH instead of +W,H.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3124 >
2023-08-12 21:11:15 +00:00
Bilal Elmoussaoui
cd27cb5c85
cleanup: Fix various typos
...
Using the typos cli app
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3169 >
2023-08-12 20:13:37 +00:00
Michel Dänzer
04f18ae726
backend/x11: Free barriers in meta_backend_x11_dispose
...
Should fix a memory leak.
Fixes: 0debb24e12
("barriers: Make barriers fully part of the
backend").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
b081e51a21
Remove unused meta_x11_display_increment_event_serial
...
Unused since dfcefd3315
("Remove meta_core_increment_event_serial").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
1a5fb51396
Remove unused meta_window_x11_has_active_sync_alarms
...
Never used AFAICT.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
75a7870259
Remove unused meta_wayland_tablet_pad_group_lookup_resource
...
Never used AFAICT.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
76c5eb0060
Remove unused meta_wayland_pointer_constraint_get_seat
...
Unused since 8a8d47725c
("backends: Delegate pointer confinements to
an impl object").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
09feed5d21
Remove unused meta_wayland_data_device_is_dnd_surface
...
Unused since 6ec7fa2cbd
("wayland: Use surface role when special
casing surface commits").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
16e8bb34de
Remove unused meta_stack_get_bottom
...
Unused since 1b3a58c951
("...").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
830f8fcf06
Remove unused meta_seat_x11_lookup_device_id
...
Unused since d72bacb3cd
("backends/x11: Drop handling of
XI_DeviceChange").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
58326c85a4
Remove unused meta_seat_impl_get_devices_in_impl
...
Never used AFAICT.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
43716457d1
Remove unused meta_renderer_x11_nested_ensure_legacy_view
...
Unused since fc8a4afc45
("Remove meta_is_stage_views_enabled()").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
3b847f28ad
Remove unused meta_region_scale_double
...
Unused since 8b3c1f4b87
("cullable: Generalize actor coordinates space
translation for regions").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
65add94bfd
Remove unused meta_rectangle_edge_to_string
...
Unused since 52bc675fcb
("introspection: remove --allow-unprefixed")
(if ever used at all).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
15df7c62a3
Remove unused meta_power_save_to_dpms_state
...
Unused since 5f6aee3419
("kms/update: Make power saving an update wide
change").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
c3afdefd15
Remove unused meta_output_is_laptop
...
Unused since cbb2a286f2
("monitor-manager: Don't use wacky physical
dimensions in display name").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
d3ec28848b
Remove unused meta_monitor_get_crtc_mode_for_output
...
Unused since e52641c4b6
("cursor-renderer/native: Replace HW cursor
with KMS cursor manager").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
7f9b71cd42
Remove unused meta_kms_update_drop_plane_assignment
...
Unused since 02b1cfe08f
("onscreen/native: Handle unexpected scanout
failures async").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
f4b8704ae9
Remove unused meta_keymap_x11_get_key_group
...
Unused since 09b956997c
("backends/x11: Drop platform-specific event
data").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
fbe904471c
Remove unused meta_get_renderer_native_parent_vtable
...
Unused since fe72876b20
("cogl/onscreen: Make swap_buffer/region
CoglOnscreen class vfuncs").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
a9b42c5c10
Remove unused meta_frame_native_set_kms_update
...
Never used AFAICT.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
a828eab13c
Remove unused meta_crtc_kms_is_gamma_invalid
...
Unused since 24bdafa220
("onscreen/native: Track GAMMA_LUT
invalidations here").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
3bf3b14e3f
Remove unused meta_crtc_kms_get/set_cursor_renderer_private
...
Unused since e52641c4b6
("cursor-renderer/native: Replace HW cursor
with KMS cursor manager").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
bdad097af1
Remove unused *_menu_for_rect functions
...
Unused since 84785951fd
("x11: Remove MetaX11WindowControl").
v2:
* Leave struct _MetaPluginClass::show_window_menu_for_rect, still used
by gnome-shell.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
63a7313a1b
compositor: Fold meta_compositor_do_manage into meta_compositor_manage
...
meta_compositor_manage hasn't been public API since 4b3cab2cca
("compositor: Don't make internal API public").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
bf53623128
Remove unused meta_clutter_x11_get_root_window declaration
...
The corresponding definition was removed in e4e0eaac9d
("clutter/backend/x11: Stop keeping track of the screen and root window").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Michel Dänzer
b0c6864b28
Remove unused meta_stack_get/set_positions
...
Unused since 9e51d98f4a
("Remove tabpopup and friends").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
Bilal Elmoussaoui
f2f9e63568
build/gi: Set header & pkgconfig names
...
So that the docs generated by gi-docgen contains them
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3087 >
2023-08-12 19:34:20 +00:00
msizanoen
6b79a0bae1
cullable: Split unobscured and redraw clip region culling
...
This splits culling into two different phases to move unobscured region
culling to pre-paint to fix #2680 . This is needed as direct scanout
skips the paint phase altogether, but the pre-paint phase always runs as
it's used for selecting the direct scanout surface.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3127 >
2023-08-12 10:27:45 +00:00
Carlos Garnacho
1d6d8d45d0
clutter: Update ClutterActorClass event vmethods to use ClutterEvent
...
With the ClutterEvent subtype structs sealed, this remains the only useful
struct type that is now usable on the Javascript side. Make all
ClutterActorClass event vmethods use ClutterEvent, and update all users
to this change.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3163 >
2023-08-09 11:53:18 +00:00
Carlos Garnacho
f168866369
backends/native: Fix handling order of key event
...
First create the event with the current xkb modifier mask, then
update the xkb_state and the modifier mask. This is how it happened
before commit 2e8d839708
, and how it should stay.
Fixes: 2e8d839708
("backends/native: Port to new event constructors")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2951
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3162 >
2023-08-09 11:36:42 +00:00
Carlos Garnacho
dc527ed510
backends/native: Close the input thread in all situations on dispose
...
In test situations we sometimes do not create a libinput context, so
our check on dispose to see if we need closing the input thread is off
if META_SEAT_NATIVE_FLAG_NO_LIBINPUT was provided.
Check the input thread existing instead, since that is the thing we
want to undo here.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:11:13 +02:00
Carlos Garnacho
ba4795a5f9
tests: Use ClutterEvent getter methods
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:11:13 +02:00
Carlos Garnacho
60aa098e94
backends/x11: Use ClutterEvent getter methods
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:11:13 +02:00
Carlos Garnacho
dbbfd03436
backends/native: Use ClutterEvent getter methods
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:11:13 +02:00
Carlos Garnacho
8f3e503c04
backends: Use ClutterEvent getter methods
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:11:13 +02:00
Carlos Garnacho
64490c3489
wayland: Use ClutterEvent getter methods
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:11:13 +02:00
Carlos Garnacho
71fb87a9f2
compositor: Use ClutterEvent getter methods
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:11:13 +02:00
Carlos Garnacho
17191d5a6c
core: Use ClutterEvent getter methods
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:11:11 +02:00
Carlos Garnacho
9dd2edac18
clutter: Add private call to describe an event
...
Move the string construction bits in the event logging happening in
MetaSeatImpl to a clutter_event_describe() call, so that it has more
freedom in fiddling with ClutterEvent internals, and may be potentially
reused in other places.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
97213041e8
clutter: Add getters/arguments for missed ClutterEvent fields
...
Add methods, and change the API of some rarely used methods, in order
to make all event info currently held/necessary accessible through
ClutterEvent getters, instead of direct field access.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
562c5532c4
backends/native: Rewrite event for sticky keys
...
Avoid modifying the event in place, and use a full copy with changed
modifiers, for sticky keys purposes.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
2c86bff0cc
backends/x11: Drop clutter_event_set_state_full() helpers
...
Since the full decomposed modifier state is unused, and only the
effective modifier mask matters to users, the new constructors take
just this effective modifier mask. This means this helper went
unused in the port to the new constructors, so can be now dropped.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
a837b105d0
backends/native: Drop clutter_event_set_state_full() helpers
...
Since the full decomposed modifier state is unused, and only the
effective modifier mask matters to users, the new constructors take
just this effective modifier mask. This means this helper went
unused in the port to the new constructors, so can be now dropped.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
2e8d839708
backends/native: Port to new event constructors
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
1f9e787b83
backends/x11: Use new constructor for emulated pointer events
...
Use the new constructor to generate a synthesized motion event.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
75e8bab1c1
backends/x11: Use new event constructors
...
Use the new event constructors to create input events, instead
of creating them through clutter_event_new (CLUTTER_NOTHING) and
struct field fiddling.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
85b13ebd18
core: Pass ClutterStage explicitly to MetaGestureTracker
...
Pass a ClutterStage argument explicitly, instead of fetching it
from the event.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
77510ca72d
wayland: Avoid getting the ClutterStage through ClutterEvents
...
Fetch the ClutterStage through other means, as that field will go
away from events.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
af9d406610
tests: Avoid getting the stage through ClutterEvents
...
Obtain the stage through other means, as this information will
eventually move away from events.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
6fd7f95ed3
tests: Port faked events to new constructors
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:02:54 +02:00
Carlos Garnacho
c5fc9481c5
backends/x11: Drop return value from main XEvent handler
...
This return value is unchecked, and may be removed. While at it
rename the function to meta_backend_x11_handle_event().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:00:35 +02:00
Carlos Garnacho
ca3256ee97
backends/x11: Rename function to reset X11 cached current monitor info
...
This is done from the backend X11 connection, but needs directing at times
from the frontend X11 connection. Commit 5a8509f895
added a XEvent
argument presumably for possible future expansions that did never come.
Since this function is nothing about events, drop the XEvent argument and
make the name a little bit more ad-hoc (according to what it does, at
least).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 04:00:11 +02:00
Carlos Garnacho
d5938958c0
clutter: Drop ClutterBackend translate_event vmethod
...
Despite the attempt to make this a generic interface, this was
pretty much used only by the X11 backend, and now it ported away
from it.
This now stands unused and may be removed, in favor of backends
each creating and injecting events as they please.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:59:43 +02:00
Carlos Garnacho
b3d6ae34ee
backends/x11: Handle MetaSeatX11 event translation in main event handler
...
This is about the only reason now to go through the ClutterBackend
translate_event vmethod. We can do that directly, and stop requiring the
generic vmethod that is actually just used for X11 events.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:59:43 +02:00
Carlos Garnacho
990a50539e
backends/x11: Handle stage events from the main XEvent handler
...
This does not do any event translation, so does not need to be
handled through the translate_event() ClutterBackend vfunc.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:59:43 +02:00
Carlos Garnacho
830a5c0caa
backends/x11: Drop unused event time accounting in MetaClutterBackendX11
...
This has been unused for some time, by the looks of it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:59:43 +02:00
Carlos Garnacho
a5519fe544
backends/x11: Drop MetaClutterBackendX11 event filters
...
These are now unused, and may be removed. Event handling in
the backend Display should happen directly from the XEvent
handler from now on.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:59:43 +02:00
Carlos Garnacho
def478edc8
backends/x11: Handle a11y changing XKB events together with other XKB events
...
There's no need for an XEvent filter, since this is already code close enough
to MetaBackendX11 XEvent handling and always required anyways. Make the a11y
configuration checks happen directly from MetaBackendX11 event handling.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:59:41 +02:00
Carlos Garnacho
0dfb5d1c31
backends/x11: Call cogl xlib event handler directly when handling XEvents
...
We are pretty much guaranteed that the first event will be handled after
the cogl renderer has been set up. We can avoid the loop through
ClutterBackend vmethods and X11 event filters, and call this directly
from the code that is already close to the MetaClutterBackendX11.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:58:42 +02:00
Carlos Garnacho
a08eea7f10
backends: Do not use clutter_event_[set|is]_pointer_emulated()
...
Add a new ClutterEventFlag to propagate this information, affecting
a few selected events on each backend.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:58:42 +02:00
Carlos Garnacho
9e96b523ea
wayland: Change MetaWaylandDragDest::motion vmethod signature
...
Stop taking a ClutterEvent and pass the essentials here (x/y/evtime),
we don't have a ClutterEvent handy in all places that we call this
API, and it feels awkward to create one just for calling this vmethod.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:58:42 +02:00
Carlos Garnacho
2e3d55c948
clutter: Change clutter_do_event() name/signature
...
It is a bit backwards that events contain information about
the stage they are being handled by. It makes more sense to
specify in the ClutterEvent handling entrypoint the stage
that will handle the event.
As a first step, add this ClutterStage argument, even though
the information is still carried through the event in order to
keep satisfying calls to the getter function.
This entrypoint has been also renamed to clutter_stage_handle_event(),
so that its ownership/namespace is clearer.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:58:42 +02:00
Carlos Garnacho
72c433ef02
compositor: Stop forwarding MapNotify events back through the backend
...
Nowadays, all our MapNotify event handling happens already prior to
the MetaCompositorX11 handling of XEvents. It does not make sense to
channel these events again through the backend, at best all it could
lead to is double handling of the same events.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153 >
2023-08-08 03:58:42 +02:00
Bilal Elmoussaoui
a955f0e47c
cleanup: Make include macro usages consistent
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3157 >
2023-08-07 22:24:36 +00:00
Bilal Elmoussaoui
ead9a3024c
cleanup: Switch to pragma once
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3157 >
2023-08-07 22:24:36 +00:00
Olivier Fourdan
d291d4a733
settings: Set xwayland_allow_byte_swapped_clients at startup
...
The value for the key "xwayland-allow-byte-swapped-clients" was being
updated on change, but never actually set at startup.
As a result, Xwayland was spawned with byteswap clients disabled, even
if the key was set to TRUE.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2938
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3156 >
2023-08-07 22:08:37 +00:00
Olivier Fourdan
b9b26cba03
settings: Use appropriate type for xwayland-allow-byte-swapped-clients
...
The key "xwayland-allow-byte-swapped-clients" is of type boolean, it's
not a flag.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3156 >
2023-08-07 22:08:37 +00:00
Olivier Fourdan
e35eafebba
settings: Remove stray new line
...
Cosmetic only, no functional change.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3156 >
2023-08-07 22:08:37 +00:00
Jonas Ådahl
8a20d20fe9
kms/cursor-manager: Set hotspot
...
This is important when running via virtual machines.
Fixes: 6d873036e0
("Add KMS cursor manager")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2916
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3147 >
2023-08-07 21:27:53 +00:00
Jonas Ådahl
6ea816184d
cursor-renderer/native: Scale hotspot correctly
...
This got lost during the switch to the KMS cursor manager.
Fixes: e52641c4b6
("cursor-renderer/native: Replace HW cursor with KMS cursor manager")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3147 >
2023-08-07 21:27:53 +00:00
Jonas Ådahl
730efb17d7
cursor-renderer/native: Change comma to semi colon
...
It was a typo.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3147 >
2023-08-07 21:27:53 +00:00
Bilal Elmoussaoui
68b4cc661d
clutter: Remove deprecated & unnused enums
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3103 >
2023-08-07 19:30:34 +00:00
Bilal Elmoussaoui
185058456f
clutter: Remove deprecated BoxLayout pack-start property
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3103 >
2023-08-07 19:30:34 +00:00
Bilal Elmoussaoui
8d038789f6
clutter: Remove deprecated macros usage
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3103 >
2023-08-07 19:30:34 +00:00
Carlos Garnacho
cd39ba8baf
core: Get per-direction pad feature labels for rings/strips
...
Let the caller specify the directions, so that the pad OSD UI may
assign distinct labels to each direction, instead of showing an
unified one on both directions.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3005 >
2023-08-07 18:25:01 +00:00
Carlos Garnacho
3e3660ae5f
core: Drop META_PAD_DIRECTION_NONE
...
Avoid this strange value, and stick with the ones suitable
for rings/strips.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3005 >
2023-08-07 18:25:01 +00:00
Carlos Garnacho
3e6f7a9463
core: Drop META_PAD_FEATURE_BUTTON value
...
This is now handled externally through separate API calls.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3005 >
2023-08-07 18:25:01 +00:00
Carlos Garnacho
2da9b67673
core: Separate pad button labels in high-level MetaDisplay API
...
These "features" are somewhat less featured, it's becoming too ugly
to handle all of them with a single API call. The clear outlier are
buttons, so move them to a separate function.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3005 >
2023-08-07 18:25:01 +00:00
Carlos Garnacho
b6a6e9f187
core: Separate MetaPadActionMapper pad button labeling
...
This will be handled separately in future commits.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3005 >
2023-08-07 18:25:00 +00:00
Carlos Garnacho
85ac3a2d1a
wayland: Separate pad button labeling from other pad features
...
This will be fully split in future commits.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3005 >
2023-08-07 18:25:00 +00:00
Carlos Garnacho
233e612ef8
core: Rename MetaPadActionType to MetaPadFeatureType
...
We want to separate pad buttons from strips and rings for
purposes of labeling. Start by renaming the enum "features"
to use a less englobing word.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3005 >
2023-08-07 18:25:00 +00:00
Jonas Ådahl
112cca75e2
kms/impl-device: Remove deadline timer arming from queue_update()
...
queue_update() in a previous iteration was called in two situations:
* A page flip was already pending, meaning if we would commit an
update, it'd fail with EBUSY.
* A update was marked as "always-defer" meaning it should only be
processed from the deadline callback (would there be one). These were
used for cursor-only updates.
In the latter, we had to arm the deadline timer when queuing a new
update, if it wasn't armed already, while in the former, we would
currently idle, waiting for the page flip callback. At that callback
would the deadline timer be re-armed again.
Since we're only handling the former now, we'll never need to arm the
timer again, so remove code doing so. The code removed were never
actually executed anymore, after the "always-defer" flag on updates was
removed.
Fixes: 27ed069766
("kms/impl-device: Add deadline based KMS commit scheduling")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2940
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3150 >
2023-08-07 15:59:18 +00:00
Daniel van Vugt
bafea13e95
kms/impl-device: Handle empty updates properly
...
This fixes freezes on cursor movement when:
1. meta_onscreen_native_finish_frame would create an empty update.
2. maybe_update_cursor_plane would leave it empty (!cursor_invalidated).
3. do_process would fail to recognise a non-null empty update as an error.
4. meta_kms_impl_device_handle_update would fail to send feedback on errors
from do_process, because do_process is meant to do it.
5. Page flip listeners would wait forever for feedback that never comes.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2923 ,
https://gitlab.gnome.org/GNOME/mutter/-/issues/2924 ,
https://gitlab.gnome.org/GNOME/mutter/-/issues/2926 ,
https://gitlab.gnome.org/GNOME/mutter/-/issues/2933
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3138 >
2023-08-07 16:51:43 +08:00
Daniel van Vugt
b516b009fa
kms/impl-device: Treat handling update as flushing
...
Primary plane updates were forgetting to do this in OnscreenNative, but
rather than do it for each post there we should simply do it for each
post.
This fixes cursor stutter in the fallback path (not using deadline timers)
where needs_flush_crtcs would remain populated but CRTC_NEEDS_FLUSH would
never be emitted, because handle_flush hadn't been called for the last
post.
This is safe as the current use of scheduled flushing is only for cursor
updates, and since cursor updates happen on the same thread as processing,
and due to the fact that we always use the most up to date cursor position
when flushing, we never risk leaving an old cursor state unflushed.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3138 >
2023-08-07 16:50:36 +08:00
Daniel van Vugt
7493ed39ce
kms/impl-device: Avoid retrying a failing deadline timer
...
So as to not fill the log with:
Failed to determine deadline: drmWaitVBlank failed: Operation not permitted
This currently happens on nvidia-drm but hopefully Nvidia will fix that
in future.
Relates to: https://gitlab.gnome.org/GNOME/mutter/-/issues/2923 ,
https://gitlab.gnome.org/GNOME/mutter/-/issues/2924
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3138 >
2023-08-07 16:30:32 +08:00
Daniel van Vugt
5a33e98431
kms/update: Remove unused is_flushing function
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3148 >
2023-08-04 09:37:33 +00:00
Daniel van Vugt
6c97bd79d7
kms/cursor-manager: Fix backwards FB_UNCHANGED flag
...
It was causing the simple/legacy backend to never upload cursor buffers.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2927 ,
https://gitlab.gnome.org/GNOME/mutter/-/issues/2931
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3144 >
2023-08-02 16:15:11 +08:00