1
0
Fork 0
Commit graph

30490 commits

Author SHA1 Message Date
Carlos Garnacho
c45a64be7a ci: Look for matching ref in user remote for branch pipeline
Same reasoning than gnome-shell@dbc9ebc6abc8 applies, it may be
useful to run a pipeline with matching branches in the other
project, without necessarily opening a merge request.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:11:13 +02:00
Carlos Garnacho
46cb355799 clutter: Make ClutterEvent structs private
All ClutterEvent users have been changed to use getter methods
instead of direct field access. We may now make the ClutterEvent
union/structs entirely opaque by moving the definitions out of
public headers.

All future usage of ClutterEvent data should be done through
getter methods.

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
440c249031 clutter: Use ClutterEvent getter methods
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:02:54 +02:00
Carlos Garnacho
1708becaea cally: Use ClutterEvent getter methods
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:02:54 +02:00
Carlos Garnacho
ded1a9b351 clutter: Use brand new event to contain compressed motion information
Avoid overwriting ClutterEvent fields, and build a new ClutterEvent from
the previous information.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:02:54 +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
fec26f201a clutter: Drop all ClutterEvent setter functions
All events are now created through the dedicated constructors,
thus no post-creation event fiddling should be necessary.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:02:54 +02:00
Carlos Garnacho
322b40ad39 clutter: Drop "state full" event getter and setter
The full decomposed modifier state is pretty much unused, relying
in keymap signals/properties to track latched modifiers state instead.
The events can be simplified without having this information, and if
it were ever needed in the future, it would be nicer that it had a
dedicated struct and didn't increase the number of arguments in
ClutterEvent constructors.

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
b809023f4d clutter: Create full event copy when handling unfiltered IM key events
We need to change at least event flags in the event we reinject after
it was let through by the IM, in order to avoid doubly handling.
Create a full event copy from the original event parameters.

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
c341bf5af9 clutter: Drop ClutterStage field from ClutterEvent
Avoid setting in ClutterEvents the stage they will end up
delivered through. This is now handled explicitly where it
matters.

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
845277f7fb clutter: Make clutter_event_get_source() only about crossing events
Avoid peeking in the stage for loosely related actors, since the same
event could be handled by different actors across the picking stack.

This getter is also unused, so there's wiggle room here for changes.

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
36fda95217 clutter: Get stage in ClutterClickAction through actor
Avoid accessing the event for this information.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:02:54 +02:00
Carlos Garnacho
043ff8f98f cally: Avoid access to stage through ClutterEvent
Pass the stage explicitly, in order to avoid having to peek to it
through the event.

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
a8c62251f8 clutter: Port stage crossing 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
6aa42d6dad clutter: Port ClutterInputMethod generated events to new constructors
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:02:53 +02:00
Carlos Garnacho
a4639db847 clutter: Add new private set of event constructors
These constructors take all the necessary arguments to build the
event from the get go, so the callers are not left up with the task
of setting up the event struct data.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 04:02:02 +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
e648ef7980 clutter: Pass stage to emit_event()
Avoid poking at the event field, and use an explicit parameter.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
2023-08-08 03:58:42 +02:00
Carlos Garnacho
b52aa487c8 clutter: Change _clutter_process_event name/signature
Avoid using the ClutterEvent stage field, and pass the stage
explicitly. Also rename to clutter_stage_process_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
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
Fran Dieguez
b2dc5b72a1 Update Galician translation 2023-08-08 00:09:00 +00:00