summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* backends/native: Dispose the libinput device in the input threadwip/carlosg/dispose-libinput-deviceCarlos Garnacho2020-12-163-1/+10
| | | | | | | | | Currently, the MetaInputDeviceNative owns the libinput_device, with the small catch that it is eventually finished in the main thread (as the CLUTTER_DEVICE_REMOVED event keeps the last reference to it). Make it sure that the libinput_device is destroyed in the input thread, before giving away the last extra input device references.
* backends/native: Make device grouping libinput independentCarlos Garnacho2020-12-162-5/+7
| | | | | Keep device groups as opaque pointers, and just compare those afterwards.
* backends/native: Make group modes checks libinput device independentCarlos Garnacho2020-12-162-6/+11
| | | | Remove the dependence on the underlying libinput device here.
* backends/native: Make mode switch checks libinput independentCarlos Garnacho2020-12-161-6/+21
| | | | Add this info to the PadFeatures array, and pull it from there.
* clutter/effect: Move ClutterEffect creation to ClutterActorGeorges Basile Stavracas Neto2020-12-153-8/+11
| | | | | | As so paint node creation is centralized in a single function. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/offscreen-effect: Document paint nodesGeorges Basile Stavracas Neto2020-12-151-0/+24
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/effect: Add paint nodes to all paint vfuncsGeorges Basile Stavracas Neto2020-12-158-75/+59
| | | | | | | | | | | | In the purely paint node based rendering future, ClutterEffects simply add more paint nodes to the tree when painting the actor. This is the leap to achieve that future. Add paint nodes to pre_paint, paint, and post_paint, and move the ClutterEffectNode creation to _clutter_effect_paint(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/offscreen-effect: Implement paint_node()Georges Basile Stavracas Neto2020-12-151-0/+35
| | | | | | | | | | | | | | | | | | | | | The paint node tree that ClutterOffscreenEffect generates is simple: Root |------------+ | | Layer Pipeline | Actor Right now, both pre-paint and ClutterLayerNode push the offscreen to the framebuffer stack. That's harmless, and will go away soon anyway. The actor node is created and added in a separate function because it'll be reused by the next commit. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/offscreen-effect: Use paint nodes to paint targetGeorges Basile Stavracas Neto2020-12-155-23/+64
| | | | | | | | | Add a new ClutterPaintNode parameter to the paint_target() vfunc. For now, create a temporary ClutterEffectNode that is passed to paint_target() and immediately painted; next commits will move this to upper layers. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/desaturate-effect: Switch to create_pipeline vfuncGeorges Basile Stavracas Neto2020-12-151-51/+14
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/colorize-effect: Switch to create_pipeline vfuncGeorges Basile Stavracas Neto2020-12-151-49/+13
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/brightness-contrast-effect: Switch to create_pipeline vfuncGeorges Basile Stavracas Neto2020-12-151-47/+14
| | | | | | | Pretty much the exact same steps and constraints of the previous commit. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/blur-effect: Switch to create_pipeline vfuncGeorges Basile Stavracas Neto2020-12-151-65/+31
| | | | | | | | | | The blur pipeline is still cached on ClutterBlurEffect, and we simply update the uniforms when asked to create the pipeline. Now that ClutterOffscreenEffect will use the blur pipeline, it doesn't need to override the paint_target() vfunc anymore. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/offscreen-effect: Add new create_pipeline() vfuncGeorges Basile Stavracas Neto2020-12-152-11/+27
| | | | | | | | | | | | | | | The most annoying aspect of ClutterOffscreenEffect right now, and the reason for all its subclasses to override pre-paint, is that the pipeline creation isn't under subclasses' control. That means all subclasses must ask ClutterOffscreenEffect to run pre-paint and create the pipeline, then they all create their own pipelines to paint. To reduce this complexity, add a new create_pipeline() vfunc to ClutterOffscreenEffect. Next commits will port effects to use this new vfunc. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* clutter/paint-nodes: Make ClutterLayerNode always push/popGeorges Basile Stavracas Neto2020-12-151-4/+3
| | | | | | | | | | | | ClutterLayerNode currently skips pushing the offscreen framebuffer when no operations are set. This was added at the time because pushing and popping was a synchronization point in Cogl, slow enough to force the layer node to have this protective measure. Nowadays, pushing and popping on the paint context is free. Make ClutterLayerNode always push and pop in pre and post paint. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
* build: Use Xwayland pkg-config if availableOlivier Fourdan2020-12-151-4/+16
| | | | | | | | | | | | | Xwayland in its main development branch now provides a pkg-config file which can be used to determine Xwayland installation path and various options enabled at build time. Change mutter build system to optionally use that mechanism if available. If not (as with Xwayland from the current stable branch), keep the fallback mechanisms (basically search for the Xwayland and parse its command line options to determine if initfd is available). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1635>
* Updated Spanish translationDaniel Mustieles2020-12-151-57/+84
|
* Introduce ClutterBlurNodeGeorges Basile Stavracas Neto2020-12-142-0/+169
| | | | | | | | | ClutterBlurNode is a paint node based on ClutterLayerNode that draws all children in an offscreen framebuffer, blurs this framebuffer, and finally paints the blurred contents according the the paint operations added. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1627>
* clutter: Add private ClutterBlurGeorges Basile Stavracas Neto2020-12-143-0/+464
| | | | | | | ClutterBlur is a small helper structure that implements blurring a texture. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1627>
* clutter/paint-nodes: Fix blit node oversightsGeorges Basile Stavracas Neto2020-12-141-2/+2
| | | | | | | | | | | Copy-paste error sneaked ClutterTransformNodeClass in clutter_blit_node_class_init(). It wasn't problematic because they both typedef to ClutterPaintNodeClass, but fix it anyway. Also switch to g_object_ref() in clutter_blit_node_new(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1627>
* cogl/framebuffer: Add COGL_EXPORT to public functionGeorges Basile Stavracas Neto2020-12-141-1/+1
| | | | | | An oversight of 038a3170bf971a6. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1627>
* Update Romanian translationFlorentina Mușat2020-12-121-2/+19
|
* Update Romanian translationFlorentina Mușat2020-12-121-86/+95
|
* clutter/text: Make update_cursor_location() operate in stage coordinatesDaniel van Vugt2020-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now we would `clutter_input_focus_set_cursor_location` with cursor-rectangle-in-physical-pixels + actor-location-in-stage-coordinates. But those use different scaling factors so it only got the right answer when the framebuffer scale was 1.0. This directly determines the geometry of the invisible dummy cursor in gnome-shell ibusCandidatePopup.js: ``` panelService.connect('set-cursor-location', (ps, x, y, w, h) => { this._setDummyCursorGeometry(x, y, w, h); }); ``` And because it's invisible it wasn't obvious that it was wrong until you enable `CLUTTER_PAINT=damage-region` and you can see its ghost at the wrong offset and scale. So now we `clutter_input_focus_set_cursor_location` using purely unscaled stage coordinates. And `CLUTTER_PAINT=damage-region` shows that gnome-shell's `_dummyCursor` is placed precisely over the visible cursor. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3399 and probably other IBus issues that arise when using framebuffer scaling. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1576>
* clutter/text: Scale down clutter_text_get_cursor_rect to actor coordinatesDaniel van Vugt2020-12-121-1/+8
| | | | | | | | | | | `priv->cursor_rect` is stored in physical pixels, not local coordinates. So unscale it before returning from `clutter_text_get_cursor_rect`, which is explicitly documented as returning "actor-relative coordinates". This went missed with fractional scaling support, and unnoticed as nobody uses `clutter_text_get_cursor_rect` yet. But that will soon change. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1576>
* clutter/offscreen-effect: Use the paint volume origin as the FBO offsetDaniel van Vugt2020-12-121-6/+5
| | | | | | | | | | | | | | | | | | | | | Before now it was assumed that the only negative local coordinates would be those introduced by `_clutter_actor_box_enlarge_for_effects`, and we used the difference for `fbo_offset_x/y`. But that was misguided (of me) because gnome-shell can give us paint volumes at negative coordinates too, like when rendering `box-shadow` on the top or left edge of an actor. The maximum extents of negative coordinates we might need to render are in fact the (enlarged) left and top edges of the paint volume. So use those as the FBO offset. This places the actor's local origin correctly within the FBO and thus also ensures it's not over-clipped at the edges of the FBO, which now line up with the enlarged extents of the paint volume. This fixes one third of https://gitlab.gnome.org/GNOME/gnome-shell/issues/1090 The other fixes required are !1053 and gnome-shell!1417. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1538>
* clutter/actor: Use different view list when picking frame clock of stageJonas Dreßler2020-12-111-2/+7
| | | | | | | | | | | | | | | | | | | | Apparently it can happen that a timeline tries to pick a frame clock from an actor that's on a stage, but the actor still doesn't find a frame clock and returns NULL. This probably is the case when starting a timeline right after attaching an actor to a newly created stage, so before the first stage-update cycle. In this case clutter_actor_update_stage_views() will not have run and the stage-actor will have priv->stage_views set to NULL even though there are stage views. To prevent this from happening, use the complete list of stage views maintained by the backend when picking a frame clock for the stage. This doesn't fix any issue appearing on master, but is correct nonetheless. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1631>
* ci: Only fetch history for branch tipsFlorian Müllner2020-12-111-4/+10
| | | | | | | We don't need any history, so we can save a bit of bandwidth by omitting it, and only fetch the refs we are actually interested in. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
* ci: Fix checking out gnome-shell for tag pipelinesFlorian Müllner2020-12-111-3/+10
| | | | | | | | | | | $CI_COMMIT_REF_NAME can be a branch name or a tag, depending on the pipeline, but our checkout script only deals with the former at the moment. Address this by rather than looking for a remote branch name, just try to fetch the ref like we do for merge request pipelines. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
* ci: Improve checkout script outputFlorian Müllner2020-12-111-7/+16
| | | | | | | | | | | We are currently not very good at communicating what's going in, in particular for non-merge request pipelines where the output is usually just "Using origin/master instead" (instead of what?). Improve this by consistently communicate what we are looking for, whether we found it, and what we end up doing. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
* xwayland: Set xrandr primary outputAleksandr Mezin2020-12-114-1/+123
| | | | | | | | | | | | | | | To find XWayland output that should be the primary one, iterate through all XWayland outputs, and compare their geometry to the geometry of the primary logical monitor. To avoid possible race conditions (Mutter's monitor configuration already updated, but Xrandr not yet), set the output both after Randr notifications and after 'monitors-changed' signal. https://gitlab.gnome.org/GNOME/mutter/-/issues/1407 Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com> Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1558>
* xwayland: Make sure /tmp/.X11-unix/ existsJonas Ådahl2020-12-101-0/+22
| | | | | | | | | When we're running under a polyinstantiated SELinux environment, we'll likely start with an isolated and empty /tmp, meannig no /tmp/.X11-unix directory to add things to. To make it possible to still function in this kind of setup, make sure said directory exists. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1626>
* xwayland: Don't spew warnings when looking for X11 displaysJonas Ådahl2020-12-101-1/+6
| | | | | | | It's not important, so only show it when doing MUTTER_DEBUG=wayland. Instead report what display numbers were eventually found. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1625>
* xwayland: Clean up error reportingJonas Ådahl2020-12-103-63/+128
| | | | | | | | | Instead of g_warning() everywhere, use GError. This also removes the already unused 'fatal' boolean that was still passed around. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1625>
* clutter: Do not poke backend code for motion compressionCarlos Garnacho2020-12-084-55/+27
| | | | | | | We now have all info available in ClutterEvent, use it and stop poking backend internals. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* clutter: Drop infrastructure to copy/free platform event dataCarlos Garnacho2020-12-086-73/+0
| | | | | | This is now unused, all information belongs to ClutterEvents. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* backends/native: Drop MetaEventNativeCarlos Garnacho2020-12-086-114/+0
| | | | | | | This doesn't really hold anything now, so we can stop trying to copy these across events. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* clutter: Move relative motion information to ClutterEventCarlos Garnacho2020-12-087-139/+78
| | | | | | | | | | | | | | Instead of using native backend platform data specifically, store this info in ClutterMotionEvent. This includes time in usec since it's just used for motion events, in the future it could make sense to make these general to all events again, but it could make sense to make ClutterEvent structs private before. In order to express that a motion event has relative motion info, the CLUTTER_EVENT_FLAG_RELATIVE_MOTION event flag has been added for it. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* wayland: Drop HAVE_BACKEND_NATIVE checks in wl_touch implementationCarlos Garnacho2020-12-081-21/+0
| | | | | | | This file doesn't really do anything much backend-dependent anymore, we can drop these checks. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* backends: Unify touch sequence to slot conversionCarlos Garnacho2020-12-0810-37/+18
| | | | | | | | | | We had code in both backends that sort of independently associated sequences to slots. Make both transform slots to sequences the same way, so they may share the implementation convert those back to slots. This helper now lives in Clutter API. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* clutter: Move evdev evcode data to Clutter button/key eventsCarlos Garnacho2020-12-089-114/+58
| | | | | | | | | | | | We have this as platform-dependent data in the native backend, and a bunch of fallback code done in place in the evcode users. Stop making this platform-dependent data, and move it to the relevant ClutterEvents. The fallback code for the X11 backend case is about the same, but now it is done directly by the X11 backend. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* backends/x11: Drop platform-specific event dataCarlos Garnacho2020-12-083-92/+0
| | | | | | | This is largely unused, for long probably. We want to avoid adding platform data to events, so that's convenient. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* clutter: Simplify stage state managementCarlos Garnacho2020-12-0812-256/+7
| | | | | | | | | | | Making this an event is overly convoluted, accounting that we emit the event, then convert it to a ClutterStage signal, then its only consumer (a11y) sets the active ATK state. Take the event out of the equation, unify activation/deactivation of the stage in MetaStage, and use it from the X11 backend too. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* clutter: Drop CLUTTER_DESTROY_NOTIFY eventCarlos Garnacho2020-12-088-34/+5
| | | | | | | Stop propagating this as a Clutter event. DestroyNotify is only relevant on nested X11 sessions, so handle it specifically in place. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* clutter: Drop CLUTTER_CLIENT_MESSAGE eventCarlos Garnacho2020-12-087-24/+1
| | | | | | This is used nowhere and emitted nowhere. We can do without it. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
* Introduce ClutterBlitNodeGeorges Basile Stavracas Neto2020-12-082-0/+209
| | | | | | | | | | | | | | | | It is not possible to express a blit operation using paint nodes as of now. This is a requirement for GNOME Shell, e.g., to implement its blur effect. Add a new ClutterBlitNode node that takes two framebuffers as input, and blits the source framebuffer into the current one according to added rectangles. Because this paint node uses the rectangles in a different way compared to all the other nodes, add an auxiliary method to ensure all blit operations are valid. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
* clutter/paint-nodes: Add serialization to layer nodeGeorges Basile Stavracas Neto2020-12-081-0/+20
| | | | | | | It's useful to know which framebuffer the layer node is holding, so serialize that too. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
* clutter/paint-nodes: Add new ClutterLayerNode APIGeorges Basile Stavracas Neto2020-12-082-16/+61
| | | | | | | | | | | | | | ClutterLayerNode is the "offscreen framebuffer" node, that paints it's child nodes in a separate framebuffer, and then copies that framebuffer to the parent one. It'll be useful to hand ClutterLayerNode which framebuffer and pipeline to use, as this is a requirement for porting e.g. ClutterOffscreenEffect and subclasses. Add a new clutter_layer_node_new_to_framebuffer() API. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
* clutter/paint-nodes: Add opacity overriding to ClutterActorNodeGeorges Basile Stavracas Neto2020-12-084-4/+24
| | | | | | | | | | | | Some effects, such as ShellBlurEffect and ClutterOffscreenEffect, need to make sure the actor is painted fully opaque. With ClutterActorNode, however, that is currently not possible. Add a new 'opacity' parameter to clutter_actor_node_new(). It follows the opacity override heuristic, where -1 means disable, and anything else is clamped to [0, 255]. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
* clutter/effect: Add paint_node vfuncGeorges Basile Stavracas Neto2020-12-082-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new paint_node vfunc that, if implemented, allows the effect to add nodes to a transient paint node that is immediately painted. This is a transitional step until we have fully delegated paint node rendering. The most basic implementation of a ClutterEffect.paint_node vfunc, and also the default implementation, is with an actor node, as follows: ``` static void foo_bar_paint_node (ClutterEffect *effect, ClutterPaintNode *node, ClutterPaintContext *paint_context, ClutterEffectPaintFlags flags) { g_autoptr (ClutterPaintNode) actor_node = NULL; actor_node = clutter_actor_node_new (effect->actor); clutter_paint_node_add_child (node, actor_node); } ``` This example gives the exact same behavior of simply calling clutter_actor_continue_paint(). In the future, the paint node itself will be a parameter of clutter_actor_continue_paint() and we'll be able to simplify it event more. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>