summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: Always generate a machine IDbenzea/ci-add-machine-idBenjamin Berg2019-12-111-0/+4
| | | | | | | | At least the F30 base image does not seem to ship with a machine-id. This causes tests that require DBus to fail as the dbus daemon cannot be started. https://gitlab.gnome.org/GNOME/mutter/merge_requests/967
* Update British English translationBruce Cowan2019-12-111-104/+106
| | | | (cherry picked from commit c05328f76a163be287a4f3660bfd0edc20c63ce7)
* xwayland: Don't queue frame callbacks when role assignedJonas Ådahl2019-12-101-19/+0
| | | | | | | | | | | | | 'xwayland: Do not queue frame callbacks unconditionally' changed the frame callback behavior of Xwayland surfaces so that they behave the same way as other actor surfaces (e.g. xdg-shell ones), except for the case when they are initially assigned. Remove this special casing as well including the now incorrect comment, so that the Xwayland surfaces behave the same as the others in this regard also when assigning. https://gitlab.gnome.org/GNOME/mutter/merge_requests/964
* clutter-timeline: Fix some indentationRobert Mader2019-12-091-13/+13
| | | | | | | | In Gnome Builder this looks very odd, much worse than in git. We'll probably not touch the code soon, so fix indentation for better readability. https://gitlab.gnome.org/GNOME/mutter/merge_requests/965
* wayland: Let MetaWaylandXdgPopup dismiss incorrectly placed popupsJonas Ådahl2019-12-093-73/+28
| | | | | | | It's a xdg_popup detail, and not until the actual position is finalized is the actual correctness known. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland/surface-role: Rename commit() vfunc apply_state()Jonas Ådahl2019-12-099-63/+65
| | | | | | | | The vfunc is not called when a surface commits its state, but when the state is applied. Make this clearer by changing the name to "apply_state" (and "pre_apply_state"). https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland: Rework asynchronous window configurationJonas Ådahl2019-12-0913-266/+356
| | | | | | | | | | | | | | | | | | | | | | This changes how asynchronous window configuration works. Prior to this commit, it worked by MetaWindowWayland remembering the last configuration it sent, then when the Wayland client got back to it, it tried to figure out whether it was a acknowledgment of the configuration or not, and finish the move. This failed if the client had acknowledged a configuration older than the last one sent, and it had hacks to somewhat deal with wl_shell's lack of configuration serial numbers. This commits scraps that and makes the MetaWindowWayland take ownership of sent configurations, including generating serial numbers. The wl_shell implementation is changed to emulate serial numbers (assuming each commit acknowledges the last sent configure event). Each configuration sent to the client is kept around until the client one. At this point, the position used for that particular configuration is used when applying the acknowledged state, meaning cases where we have already sent a new configuration when the client acknowledges a previous one, we'll still use the correct position for the window. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* window/wayland: Use G_DECLARE_FINAL_TYPEJonas Ådahl2019-12-092-11/+6
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* window: Don't constrain an acked window geometryJonas Ådahl2019-12-091-0/+1
| | | | | | | | | | In Wayland, window configuration is asynchronous. Window geometry is constrained, the constrained geometry is sent to the client, and the client will adapt its surface and acknowledge the configuration. When acknowledged, we shouldn't reconstrain again, as that may invalidate the constraint calculated for the configured size. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland/wl-shell: Use input region as window geometry if setJonas Ådahl2019-12-091-1/+12
| | | | | | | | | Historically, wl_shell clients used to pretend the input region was equivalent to the window geometry, so for "correctness" lets do that here too. This makes wl_shell clients with drop shadow behave marginally better than before. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland/surface: Make cached subsurface state genericJonas Ådahl2019-12-093-10/+37
| | | | | | | | This moves the cached subsurface surface state into the generic MetaWaylandSurface namespace. Eventually it'll be used by other surface roles which as well aim to implement synhcronization. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland/surface: Rename MetaWaylandPendingState to MetaWaylandSurfaceStateJonas Ådahl2019-12-0913-139/+137
| | | | | | | | | The name didn't communicate it was about surface state, and it somewhat confusingly had the name "pending" in it, which could be confused with the fact that while it's used to collect pending state, it's also used to cache previously committed pending state. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland: Use helper to access pending state from the outsideJonas Ådahl2019-12-096-67/+110
| | | | | | | | | With the eventual aim of exposing the internals of MetaWaylandSurface outside of meta-wayland-surface.c, make users of the pending state use a helper to fetch it. While at it, rename the struct field to something more descriptive. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland/surface: Move subsurface synchronization logic to roleJonas Ådahl2019-12-093-34/+52
| | | | | | | | It's an implementation detail of subsurfaces when to cache state and when not to, so move that logic to the subsurface role implementation. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland/surface: Emit signal before applying stateJonas Ådahl2019-12-091-0/+10
| | | | | | | Will be used to invalidate depending state that should be updated as part of a surface state being applied. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* window/wayland: Make .._wayland_move_resize() name more explanatoryJonas Ådahl2019-12-097-39/+45
| | | | | | | | | The intention of meta_window_wayland_move_resize() is to finish a move-resize requested previously, e.g. by a state change, or a interactive resize. Make the function name carry this intention, by renaming it to meta_window_wayland_finish_move_resize(). https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* wayland/xdg-shell: Scope variable betterJonas Ådahl2019-12-092-2/+4
| | | | | | | A window geometry rectangle was declared in the wrong scope. Both xdg-shell and legacy xdg-shell had the same issue. https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
* backends/native: Fix double free of errorTim Crawford2019-12-061-1/+0
| | | | | | | | | error is an autoptr, so must not be explicitly freed. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1852 Fixes: 5c500ad402194 ("backend: Move GPU ownership from the monitor manager to the backend") https://gitlab.gnome.org/GNOME/mutter/merge_requests/960
* kms-impl/simple: Fix meta_set_fallback_feedback_idlePekka Paalanen2019-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Presumably this function is supposed to be like meta_kms_impl_simple_handle_page_flip_callback() but the condition in the if-statement is inverted. Fix the inversion to make these two functions look alike. This is part 2 of 2 fixing a complete desktop freeze when drmModePageFlip() fails with EINVAL and the fallback to drmModeSetCrtc() succeeds but the success is not registered correctly as completed "flip". The freeze occurs under wait_for_pending_flips() which calls down into meta_kms_impl_device_dispatch() which ends up poll()'ing the DRM fd even though drmModeSetCrtc() will not produce a DRM event, hence the poll() never returns. The freeze was observed when hotplugging a DisplayLink dock for the first time on Ubuntu 19.10. This patch makes meta_set_fallback_feedback_idle() actually end up calling into notify_view_crtc_presented() which decrements secondary_gpu_state->pending_flips so that wait_for_pending_flips() can finish. CC stable: gnome-3-34 https://gitlab.gnome.org/GNOME/mutter/merge_requests/953
* kms: Process impl idle callbacks before pre dispatch flushPekka Paalanen2019-12-064-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode_set_fallback() schedules a call to mode_set_fallback_feedback_idle(), but it is possible for Mutter to repaint before the idle callbacks are dispatched. If that happens, mode_set_fallback_feedback_idle() does not get called before Mutter enters wait_for_pending_flips(), leading to a deadlock. Add the needed interfaces so that meta_kms_device_dispatch_sync() can flush all the implementation idle callbacks before it checks if any "events" are available. This prevents the deadlock by ensuring mode_set_fallback_feedback_idle() does get called before potentially waiting for actual DRM events. Presumably this call would not be needed if the implementation was running in its own thread, since it would eventually dispatch its idle callbacks before going to sleep polling on the DRM fd. This call might even be unnecessary overhead in that case, synchronizing with the implementation thread needlessly. But the thread does not exist yet, so this is needed for now. This is part 1 of 2 fixing a complete desktop freeze when drmModePageFlip() fails with EINVAL and the fallback to drmModeSetCrtc() succeeds but the success is not registered correctly as completed "flip". The freeze occurs under wait_for_pending_flips() which calls down into meta_kms_impl_device_dispatch() which ends up poll()'ing the DRM fd even though drmModeSetCrtc() will not produce a DRM event, hence the poll() never returns. The freeze was observed when hotplugging a DisplayLink dock for the first time on Ubuntu 19.10. CC stable: gnome-3-34 https://gitlab.gnome.org/GNOME/mutter/merge_requests/953
* startup: Fix build with 'startup_notification=false'Christian Rauch2019-12-051-0/+6
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/958
* xwayland: Do not queue frame callbacks unconditionallyRobert Mader2019-12-041-26/+0
| | | | | | | | | | | The removed comment is not longer true: XWayland schedules its VSYNC from frame callbacks nowadays. Only sending callbacks when the surface actor is unobscured makes XWayland throttle its VSYNC to 1/sec, reducing repaints in many cases. Follow up of https://gitlab.gnome.org/GNOME/mutter/merge_requests/918 https://gitlab.gnome.org/GNOME/mutter/merge_requests/956
* paint-context: Expose push and pop framebufferGeorges Basile Stavracas Neto2019-12-032-5/+7
| | | | | | | | | | When rendering on-stage, it might be necessary to push offscreen framebuffers to the paint context by external consumers, such as GNOME Shell effects. Expose clutter_paint_context_push|pop_framebuffer(). https://gitlab.gnome.org/GNOME/mutter/merge_requests/955
* cogl: Make pipeline creation introspectableJonas Ådahl2019-12-034-6/+6
| | | | | | | | This means CoglContext is now also introspected, although its constructor and some getters are skipped to avoid having to expose even more types. This makes it possible to create pipelines using Javascript. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl: Remove the framebuffer and source stacksJonas Ådahl2019-12-0323-658/+13
| | | | | | | | | | They have been deprecated for a long time, and all their uses in clutter and mutter has been removed. This also removes some no longer needed legacy state tracking, as they were only ever excercised in certain circumstances when there was sources (pipelines or materials) on the now removed source stack. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl: Remove API implicitly switching between built in pipelinesJonas Ådahl2019-12-034-172/+4
| | | | | | | | | | | | This means cogl_set_source_color*() that switches to the opaque or blending pipeline, or cogl_source_set_texture() which switches to the texture pipeline. Left is the opaque pipeline, as it is still used to compare other pipelines to check whether they are opaque or not, and as the default pipeline still pushed to the source stack during initialization. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl: Remove API implicitly using framebuffer stackJonas Ådahl2019-12-033-555/+0
| | | | | | E.g. cogl_frustum(), cogl_push_matrix(), etc. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl: Remove declaration for long gone functionJonas Ådahl2019-12-031-3/+0
| | | | | | It was removed in 2011, but the declaration lingered. Until now. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl: Remove deprecated primitives functionsJonas Ådahl2019-12-039-574/+0
| | | | | | Such as cogl_rectangle() and cogl_polygon(). https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl/context: Remove unusued window_buffer fieldJonas Ådahl2019-12-034-37/+0
| | | | | | | | It kept track of the last "window" (i.e. CoglOnscreen) was the active on. It was used by API removed in the past, so also remove the left over field. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl/path: Remove API using deprecated Cogl APIJonas Ådahl2019-12-032-87/+0
| | | | | | The implicit stacks are going away, so remove API that depend on it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl/tests: Port away from legacy implicit stack based APIJonas Ådahl2019-12-036-96/+90
| | | | | | | | Use the new API where state (framebuffer, pipeline) is always passed as parameters, instead of using the implicit material and framebuffer stack. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl/tests/warp-modes: Test CoglPrimitive instead of cogl_polygon()Jonas Ådahl2019-12-031-19/+18
| | | | | | | | | Change the warp modes test to sanity check CoglPrimitive based polygon drawing instead of cogl_polygon(). This removes some checks, as cogl_polygon() has explicitly documented special behaviour for automatic wrap modes, which CoglPrimitive does not. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl/tests: Remove testing of legacy APIJonas Ådahl2019-12-034-194/+10
| | | | | | | Some tests just test that deprecated API still work as they should. Those APIs are being removed, so prepare by removing their tests. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl/tests/backface-culling: Port to non-deprecated APIJonas Ådahl2019-12-031-27/+38
| | | | | | | Usage of cogl_polygon() was ported to CoglPrimitive, and implicit framebuffer stack API was ported to explicit framebuffer based API. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl/tests/backface-culling: Stop testing legacy stateJonas Ådahl2019-12-031-15/+10
| | | | | | It's going away, so stop testing it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* cogl/tests: Remove test-materialsJonas Ådahl2019-12-032-256/+0
| | | | | | | It wasn't compiled, nor ported to the new test suite, and tests deprecated functionality that are being removed. Lets drop it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter/paint-nodes: Add missing newlineJonas Ådahl2019-12-031-0/+1
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter, core: Stop using the Cogl framebuffer stackJonas Ådahl2019-12-0329-79/+105
| | | | | | | The Cogl framebuffer stack is going away; replace all its uses by the framebuffer stack carried by the paint context. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* texture-tower: Don't use implicit framebuffer stack Cogl APIJonas Ådahl2019-12-031-3/+5
| | | | | | Replace it with the non-deprecated counterparts. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* shadow-factory: Don't set implicit Cogl materialJonas Ådahl2019-12-031-9/+3
| | | | | | | We only draw with non-deprecated API already, so there is no reason to set the source material. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter/paint-nodes: Stop using implicit framebuffer stack Cogl APIJonas Ådahl2019-12-031-3/+5
| | | | | | | | | | | | Stop using API that uses the implicit Cogl framebuffer stack, (e.g. cogl_push_matrix()) and replace usage by the corresponding API taking an explicit framebuffer (e.g. cogl_framebuffer_push_matrix()). For offscreens etc, the offscreen framebuffer is still pushed to and popped from the Cogl framebuffer stack, so that paint nodes still draw to the right framebuffer. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter/offscreen-effect: Don't use implicit framebuffer Cogl APIsJonas Ådahl2019-12-031-16/+23
| | | | | | | | While we still push and pop to the Cogl framebuffer stack, as so is still needed to render the actors correctly, don't use the API using the implicit framebuffer stack ourself in the offscreen effect code. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* tests/clutter/cogl-tex-polygon: Port to CoglPrimitiveJonas Ådahl2019-12-031-42/+68
| | | | | | | | | Instead of using cogl_polygon(), which uses deprecated API, implement polygon drawing using the CoglPrimitive API family. While the test might have been used to explicitly test cogl_polygon() it could still be useful to test the non-deprecated way of rendering polygons. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* tests/clutter: Port to using non-implicit framebuffer Cogl APIJonas Ådahl2019-12-0312-164/+249
| | | | | | | | | | | | | | | Port tests to use API such as cogl_framebuffer_push_matrix() instead of cogl_push_matrix() all over the Clutter tests, with one exception: cogl_polygon(). It'll be ported over in a separate commit, as it is less straight forward. Implicitly set CoglMaterial properties are changed to explicitly created and destructed CoglPipelines with the equivalent properties set. cogl_push|pop_framebuffer() is replaced by explicitly passing the right framebuffer, but tests still rely on cogl_get_draw_framebuffer() to get the target framebuffer. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter/paint-node: Use non-deprecated Cogl API when drawing operationsJonas Ådahl2019-12-031-29/+25
| | | | | | | The paint node drawing partly used deprecated Cogl implicit stack APIs. Port that over to the non-deprecated variants. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter/paint-node: Have caller of .._get_framebuffer() handle fallbackJonas Ådahl2019-12-033-8/+25
| | | | | | | | | | clutter_paint_node_get_framebuffer() fell back on cogl_get_draw_framebuffer() when the root node didn't have a custom get_framebuffer vfunc. As this relies on deprecated implicit Cogl stack API, it needs to go away, so handle this in the caller that knows more about the context. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter/pipeline-paint-node: Use draw framebuffer when drawing primitivesJonas Ådahl2019-12-031-1/+1
| | | | | | | As with all the other draw operations, use the current draw framebuffer to draw the primitives. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter/root-node: Require non-null framebuffer on constructionJonas Ådahl2019-12-031-5/+3
| | | | | | | It's the only way it's used, and it removes a usage of deprecated Cogl implicit stack API. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
* clutter/paint-node: Remove unnecessary NULL check in get_framebuffer()Jonas Ådahl2019-12-031-3/+0
| | | | | | | The only way we would ever get NULL there is if the node passed to the function is NULL, and that is invalid input to begin with. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935