summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* boxes: Add API to crop and scale a MetaRectangleRobert Mader2019-02-062-0/+22
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/323
* Updated Spanish translationDaniel Mustieles2019-02-061-42/+51
|
* Update Hungarian translationBalázs Úr2019-02-051-44/+52
|
* Update Friulian translationFabio Tomat2019-02-051-41/+48
|
* monitor-manager: Provide proper contexts for translatorsJonas Ådahl2019-02-041-9/+10
| | | | | Two strings were both "%s %s", but with different meaning. Let translators know the difference by providing context using C_().
* monitor-manager: Add yet another wacky "physical dimension"Dariusz Gadomski2019-02-041-1/+3
|
* monitor-manager: Don't use wacky physical dimensions in display nameDariusz Gadomski2019-02-043-16/+50
|
* monitor-manager: Use output name as display name in GetResourcesDariusz Gadomski2019-02-041-1/+1
|
* meson: Do not install cogl config.env if installed tests are disabledMarco Trevisan (Treviño)2019-02-041-2/+9
| | | | | | | | | Until meson 0.50, setting the install parameter in 'configure_file' is ignored if 'install_dir' is set. Then until mutter doesn't depend on such meson version cogl_installed_tests_libexecdir should be empty unless have_installed_tests is false, or this file will be installed anyway. See https://github.com/mesonbuild/meson/issues/4160
* Don't include potentially sensitive window titles in logsJosh Triplett2019-02-031-16/+2
| | | | | | | | For various error and warning messages, mutter includes a description of the window, and that description includes a snippet of the title of the window. Those snippets find their way into system logs, which then means they can potentially find their way into bug reports and similar. Remove the window title information to eliminate this potential privacy issue.
* clutter/paint-nodes: Push/pop framebufferGeorges Basile Stavracas Neto2019-02-011-0/+3
| | | | | | | | | | | | | | | Unfortunately, many parts of GNOME Shell and Mutter and Clutter still use the implicit Cogl1 API. As such, it as a transition between the old and new APIs, it is important to keep the implicit draw framebuffer updated. ClutterRootNode does not keep it updated though, and it might lead to problems when rendering offscreen textures. Fix that by pushing and popping the root node framebuffer on pre- and post-draw, respectively. https://gitlab.gnome.org/GNOME/mutter/merge_requests/405
* clutter/paint-nodes: Expose ClutterRootNodeGeorges Basile Stavracas Neto2019-02-014-14/+27
| | | | | | | | | | | | | | | | | The ClutterRootNode paint node is theoretically the top-most node of a paint nodes tree, except that we are not in the point of having full rendering trees in Clutter (all rendering performed by paint nodes is still local and immediate). When controlling the rendering tree, MetaShapedTexture may need to paint into an offscreen framebuffer under some circumstations. Expose ClutterRootNode so that MetaShapedTexture can use it to render to offscreen framebuffers. https://gitlab.gnome.org/GNOME/mutter/merge_requests/405
* clutter/paint-node: Expose clutter_paint_node_paint()Georges Basile Stavracas Neto2019-02-014-6/+8
| | | | | | | | | When painting to an offscreen framebuffer, MetaShapedTexture will need to have full control of the painting routines of paint nodes. As such, expose clutter_paint_node_paint() to allow forcing a paint nodes paint from MetaShapedTexture. https://gitlab.gnome.org/GNOME/mutter/merge_requests/405
* clutter/paint-node: Add multitexture APIGeorges Basile Stavracas Neto2019-02-014-1/+101
| | | | | | | | | | The multitexture API is not a shortcut for multiple calls to the single texture API. It is meant to wrap calls to cogl_framebuffer_draw_multitexture_rectangle(), which uses the passed texture coordinates at different layers of the pipeline. https://gitlab.gnome.org/GNOME/mutter/merge_requests/405
* clutter/image: Also invalidate sizeGeorges Basile Stavracas Neto2019-02-011-0/+26
| | | | | | | | | | | | | | | | | | | | | | | ClutterImage is a ClutterContent implementation that has an internally managed CoglTexture. This texture is recreated when new image data is set. ClutterContent implementations may have control over the allocation of the widgets they're attached to, through CLUTTER_REQUEST_CONTENT_SIZE. On those cases, if the new image data differs in size from the previous data, it is important to notify those actors about the size change. However, currently ClutterImage does not notify them. With the introduction of clutter_content_invalidate_size(), it is possible to report the size changes to attached actors. Adapt ClutterImage to invalidate_size() when image data has different sizes. https://gitlab.gnome.org/GNOME/mutter/merge_requests/405
* clutter/content: Add clutter_content_invalidate_size()Georges Basile Stavracas Neto2019-02-012-0/+51
| | | | | | | | | | | | | | ClutterContent has the ability to dictate the layout of any given actor, through the CLUTTER_REQUEST_CONTENT_SIZE request mode. However, there is no way for ClutterContent implementations to notify their attached actors that the content size changed. Add a new optional ClutterContent.invalidate_size() vfunc and clutter_content_invalidate_size(). https://gitlab.gnome.org/GNOME/mutter/merge_requests/405
* clutter-event: Correctly annotate some methodsOle Jørgen Brønner2019-01-311-0/+3
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/181
* ui: Remove fallback app menuFlorian Müllner2019-01-307-70/+22
| | | | | | | | | | | | The app menu is in the process of being retired[0], and the shell stopped displaying it while applications are in the process of dropping it. It therefore doesn't make sense to always show a fallback menu in server-side decorations, applications that still set the menu can rely on GTK+'s own fallback instead. [0] https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
* gitlab-ci: Define exported global variables onceMarco Trevisan (Treviño)2019-01-301-4/+5
| | | | | | | Don't redefine XDG runtime and gsettings schema paths multiple times, just export the variables once and reuse them. https://gitlab.gnome.org/GNOME/mutter/merge_requests/408
* gitlab-ci: Use runtime dir owned only by current userMarco Trevisan (Treviño)2019-01-301-1/+2
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/408
* gitlab-ci: Use artifacts to keep built data and reuse in testMarco Trevisan (Treviño)2019-01-301-3/+14
| | | | | | | Make test to be dependent on build phase, saving artifacts for some time in order to just run the tests without performing any rebuild. https://gitlab.gnome.org/GNOME/mutter/merge_requests/408
* screen-cast-stream: Don't broadcast PipeWireStreamAdded signalJonas Ådahl2019-01-303-3/+22
| | | | | | | | | The helper function from gdbus-codegen broadcasts the signal emission, but we really only care about sending it to the specific peer that created the session. Thus, only emit the signal to the particular peer that owns the session. https://bugzilla.gnome.org/show_bug.cgi?id=784199
* Update POTFILES.skipPiotr Drąg2019-01-301-0/+1
|
* renderer/native: fix missing GPU copy egl ext errorPekka Paalanen2019-01-301-8/+14
| | | | | | | | | | | | If the extension is missing, the GPU copy path would not work. The code sets the error, but forgets to return a failure. Fix this. While adding the necessary return FALSE, also destroy the EGL context we just created. Code refactoring shares the destroying code. Found by reading code. https://gitlab.gnome.org/GNOME/mutter/merge_requests/416
* backends/native: Don't use software renderer for GPU copyEmilio Pozuelo Monfort2019-01-301-5/+14
| | | | | | | | | | If the GPU copy path would use a software renderer, fall back to the CPU copy path. The CPU copy path is possibly faster and avoids screen corruption issues that were observed on an Intel Haswell desktop. The corruption was likely due to texturing from an unfinished rendering or memory caching issues. https://gitlab.gnome.org/GNOME/mutter/merge_requests/325
* renderer/native: Debug print chosen secondary FB formatPekka Paalanen2019-01-303-0/+54
| | | | | | | | | | | | | | | Print the pixel format chosen for an output on a secondary GPU for debugging. Knowing the format can aid in debugging e.g. red/blue channel swaps and CPU copy performance issues. This adds a DRM format printing helper in meta-crtc-kms.h. This header is included in most native backend files making it widely available, while DRM formats are specific to the native backend. It could be shared with Wayland bits, DRM format codes are used there too. The helper makes the pixel format much more readable than a "%x". https://gitlab.gnome.org/GNOME/mutter/merge_requests/341
* renderer/native: Valid formats for secondary dumb buffersPekka Paalanen2019-01-301-1/+149
| | | | | | | | | | | | | | | | | | | | When setting up an output on a secondary GPU with the CPU copy mode, allocate the dumb buffers with a DRM format that is advertised supported instead of hardcoding a format. Particularly, DisplayLink devices do not quite yet support the hardcoded DRM_FORMAT_XBGR8888. The proprietary driver stack actually ignores the format assuming it is DRM_FORMAT_XRGB8888 which results the display having red and blue channels swapped. This patch fixes the color swap right now, while taking advantage if the driver adds support for XBGR later. The preferred_formats ordering is somewhat arbitrary. Here it is written from glReadPixels point of view, based on my benchmarks on Intel Haswell Desktop machine. This ordering prefers the format that was hardcoded before. https://gitlab.gnome.org/GNOME/mutter/merge_requests/341
* crtc/kms: Add primary plane format list accessorsPekka Paalanen2019-01-302-0/+59
| | | | | | | | | | | | These functions allow inspecting which pixel formats a CRTC's primary plane supports. Future patches will inspect the supported formats and pick a framebuffer format accordingly instead of hardcoding a format. The copy list function will be used to initialize a formats list, and the supports format function will be used to intersect that list against another CRTC's supported formats. https://gitlab.gnome.org/GNOME/mutter/merge_requests/341
* crtc/kms: Document meta_crtc_kms_get_modifiersPekka Paalanen2019-01-301-0/+14
| | | | | | It has some details that may not be obvious from the function signature. https://gitlab.gnome.org/GNOME/mutter/merge_requests/341
* crtc/kms: Add fallback primary plane formatsPekka Paalanen2019-01-301-0/+21
| | | | | | | | | | | | | | | | | | | | | This avoids having to hardcode the same fallbacks elsewhere multiple times when determining what formats might be suitable for a set of CRTCs. The formats_modifiers hash table is now guaranteed to be populated with at least something, so future code will not need to handle it being empty. The hardcoded fallback formats are a minimal set probably supported by most hardware. XRGB8888 is the format that, according to ancient lore, all DRM devices should support, especially if they don't have the capability to advertise otherwise. Mutter also hardcodes XRGB8888 as the GBM surface format, so it is already required on primary GPUs. XBGR8888 matches the most common OpenGL format, sans alpha channel since scanout hardware has not traditionally supported alpha. XBGR8888 is here also because Mutter hardcodes that format for secondary GPU outputs when using the CPU copy path. https://gitlab.gnome.org/GNOME/mutter/merge_requests/341
* crtc/kms: Use plane formats if no IN_FORMATSPekka Paalanen2019-01-301-0/+23
| | | | | | | | If the IN_FORMATS property is not found, copy the formats from the DRM plane instead. This is the fallback for getting a list of formats the primary plane supports when DRM universal planes capability is enabled. https://gitlab.gnome.org/GNOME/mutter/merge_requests/341
* crtc/kms: Remove unused field formats_prop_idPekka Paalanen2019-01-301-2/+0
| | | | | | It was set but never used. https://gitlab.gnome.org/GNOME/mutter/merge_requests/341
* crtc/kms: Parse and store IN_FORMATS in fullPekka Paalanen2019-01-301-38/+50
| | | | | | | | | | | Rather than picking just one format, parse and store all the formats and their modifiers. This gives us a list of supported formats (and modifiers) on a CRTC primary plane. Later I will be using this list to choose a framebuffer format instead of hardcoding it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/341
* clutter/evdev: Set the backend keymap before using itOlivier Fourdan2019-01-301-1/+1
| | | | | | | | The device manager evdev assumes the keymap is set, so better set it before its creation. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/451 Fixes: 6de81b051 "evdev: Implement ClutterKeymap"
* clutter: Avoid redundant margin changesDaniel van Vugt2019-01-301-0/+16
| | | | | | | | | | | | | | | | | When profiling gnome-shell it was found that one of the main triggers of `clutter_actor_queue_relayout` during animations was `clutter_actor_set_margin_internal` continuously setting the same zero margins. That's obviously pointless and also expensive. So just avoid redundant margin changes. This helps to further improve performance in: https://gitlab.gnome.org/GNOME/mutter/issues/233, https://gitlab.gnome.org/GNOME/gnome-shell/issues/349 This change previously landed as 59acb3895 and then got reverted because it was found to make gnome-shell#517 worse. However that bug now has a proper fix and this branch isn't really directly related so is being reproposed...
* clutter: Add ClutterKeymap getterCarlos Garnacho2019-01-292-0/+18
| | | | It is fetched from the ClutterBackend so far.
* evdev: Implement ClutterKeymapCarlos Garnacho2019-01-299-55/+232
| | | | | | | | | | | | Just move the minimal bits to this ClutterKeymapEvdev object. Much of the functionality of a keymap is spread along ClutterSeatEvdev, ClutterDeviceManagerEvdev and ClutterVirtualInputDevice. Future refactors are due here. Also, ideally keymaps are per-seat objects (at least keyboard state is). We don't expose much info about seats altogether outside the evdev device manager implementation. We just poke the main seat at places, but eventually seats should be public.
* clutter: Add generic ClutterKeymap objectCarlos Garnacho2019-01-299-29/+164
| | | | | | | We thus far have similar objects/code internal to backends. Expose the minimum API necessary to cater for gnome-shell as a generic object. So far only the X11 backend has an actual GObject for it, and was made to be a subclass right away.
* clutter-box-layout: Use floats and assert on denormal numbersRobert Mader2019-01-281-16/+31
| | | | | | | | | | | | | | | | | | | | `distribute_natural_allocation` expects an input >= 0 of type `gint`. In `get_preferred_size_for_opposite_orientation` it is used with an unchecked variable `size` of type `gfloat`, which in case it is `Infinity`, gets passed on in the macro `MAX (0, size)`. `Infinity` becomes `G_MININT` when implicitly casted to `gint` in `distribute_natural_allocation`, triggering the assertion `extra_space >= 0`. The resulting warning in the log is counter intuitive and not very helpful. Use `float` in `distribute_natural_allocation` instead of `gint` and assert on denormal values so we can more easily identify bugs. Additionally change some types while at it and add a even more expressive warning referencing the actor at one point. https://gitlab.gnome.org/GNOME/mutter/merge_requests/375
* wayland: Implement window activation and focus stealing preventionCarlos Garnacho2019-01-262-6/+71
| | | | | | | | This is done through gtk-shell ATM. If a window requests focus with an invalid startup ID, just the demands-attention flag will be set. The "did user interaction happen in between" checks are left to meta_window_activate_full/meta_window_focus, by passing the timestamp of the original launch request.
* wayland: Update gtk-shell protocol to v3Carlos Garnacho2019-01-261-2/+12
| | | | | | | | | | | | This version has 2 new requests: - gtk_shell1.notify_launch notifies the compositor that the requesting client shall launch another application. The given ID is expected to be unique. - gtk_surface1.request_focus notifies the compositor that a surface requests focus due to it being activated. The given ID is passed to this process through undetermined means, if it corresponds with a current startup ID and there was no user interaction in between the surface will be focused, otherwise it will demand attention.
* screen-cast: Fix monitor recording on HiDPIJonas Ådahl2019-01-261-1/+5
| | | | | | | | | | It scaled the logical monitor rect with scale to get the stream dimensions, but that is only valid when having 'scale-monitor-framebuffers' enabled. Even when it was, it didn't work properly, as clutter_stage_capture_into() doesn't work properly with scaled monitor framebuffers yet. https://gitlab.gnome.org/GNOME/mutter/merge_requests/415
* Fix builds with G_DISABLE_ASSERTFlorian Müllner2019-01-2520-0/+25
| | | | | | | | | Commit 25f416c13db added additional compilation warnings, including -Werror=return-type. There are several places where this results in build failures if `g_assert_not_reached()` is disabled at compile time and the compiler misses a return value. https://gitlab.gnome.org/GNOME/mutter/issues/447
* clutter: Fix builds with G_DISABLE_ASSERTFlorian Müllner2019-01-253-0/+3
| | | | | | | | | Commit 25f416c13db added additional compilation warnings, including -Werror=return-type. There are several places where this results in build failures if `g_assert_not_reached()` is disabled at compile time and the compiler misses a return value. https://gitlab.gnome.org/GNOME/mutter/issues/447
* cogl: Fix builds with G_DISABLE_ASSERTFlorian Müllner2019-01-255-0/+6
| | | | | | | | | Commit 25f416c13db added additional compilation warnings, including -Werror=return-type. There are several places where this results in build failures if `g_assert_not_reached()` is disabled at compile time and the compiler misses a return value. https://gitlab.gnome.org/GNOME/mutter/issues/447
* clutter: Fix offscreen-effect painting of clonesDaniel van Vugt2019-01-247-265/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ClutterOffscreenEffect` had been getting the wrong bounding box in the case of clones and descendents of clones, causing visibly incorrect clipping. This was due to `clutter_actor_get_paint_box` only ever being given the source actor during a paint (which is correct) and not the clone. Even if we weren't painting a clone but an offscreened descendent of a clone (like in gnome-shell's desktop zoom), we would get the wrong result. Fortunately we don't need to know the actual clone/actor being painted so don't need to call the problematic `clutter_actor_get_paint_box` at all. The solution is to only keep untransformed rendering in the FBO and leave the correct transformation for later. The correct clone/actor's transformation is already set for us as the current cogl modelview matrix by `clutter_actor_paint`. Bonus optimization: This all means we don't need to keep `last_matrix_drawn` or force a full repaint every time some part of the transformation changes. Because the FBO contents are no longer affected by transformations. As it should be. In other words, offscreen-effected actors can now move around on screen without themselves being repainted. Special thanks to Mai Lavelle for identifying the cause of the problem. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=789050, https://bugzilla.gnome.org/show_bug.cgi?id=659523#c9, https://gitlab.gnome.org/GNOME/mutter/issues/196, https://gitlab.gnome.org/GNOME/mutter/issues/282, https://gitlab.gnome.org/GNOME/gnome-shell/issues/387, https://launchpad.net/bugs/1767648, https://launchpad.net/bugs/1779615
* meta, startup-notification: Make type declarations publicIain Lane2019-01-244-33/+13
| | | | | | | | | | Shell is using these, which was revealed by 1bbb5c8107ab77435f97c1b037a89a76121f6e3c breaking its build when generating its introspection due to meta_startup_notification_get_type() not being found. We keep the class structs private, so in practice MetaStartupSequence and MetaBackend can't be derived from (the are semi-private).
* gitlab-ci.yml: Change build step build type to debugoptimizedJonas Ådahl2019-01-231-1/+1
| | | | We will catch -Wmaybe-uninitialized errors this way.
* meta: Hide libmutter symbols by default and selectively export themMarco Trevisan (Treviño)2019-01-2366-12/+952
| | | | | | | | | | | | | Make meson link libmutter using -fvisibility=hidden, and introduce META_EXPORT and META_EXPORT_TEST defines to mark a symbols as visible. The TEST version is meant to be used to flag symbols that are only used internally by mutter tests, but that should not be considered public API. This allows us to be more precise in selecting what is exported and what is not, without the need of a version-script file that would be more complicated to maintain. https://gitlab.gnome.org/GNOME/mutter/merge_requests/395
* MonitorManager: Use composition instead of inheriting from dbus skeletonMarco Trevisan (Treviño)2019-01-234-38/+72
| | | | | | | | | | | | | | | MonitorManager was inheriting from MetaDBusDisplayConfigSkeleton, this was causing introspection to see this like a GDBus skeleton object exposing to clients methods that were not required. Also, this required us to export meta_dbus_* symbols to the library, while these should be actually private. So, make MetaMonitorManager to be just a simple GObject holding a skeleton instance, and connect to its signals reusing most of the code with just few minor changes. https://gitlab.gnome.org/GNOME/mutter/merge_requests/395