summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* clutter/stage: Cast the stage just when neededgbsneto/chartsGeorges Basile Stavracas Neto2019-04-171-3/+2
| | | | | | | | | If we use a variable, and the debug notes are disabled at compile time, the variable becomes unused and we are warned. Remove this variable and instead cast inline. https://gitlab.gnome.org/GNOME/mutter/merge_requests/502
* Add frame time chartGeorges Basile Stavracas Neto2019-04-176-0/+235
| | | | | | | | | | | | | | Add a chart at the bottom 10% of the screen where each bar represents the time the frame took to be painted. The red line represents the maximum time to draw. For example, if you are on a 60Hz monitor, the red line means 16.6667 miliseconds. This covers both layout time (green) and paint time (blue). Enjoy. https://gitlab.gnome.org/GNOME/mutter/merge_requests/502
* clutter/stage: Add private getter to sync delayGeorges Basile Stavracas Neto2019-04-172-0/+10
| | | | | | | | | It will be used by the frame chart to correctly place the red bar. The math is essentially: ms_per_frame = (1 / refresh rate) * 1000 - sync delay https://gitlab.gnome.org/GNOME/mutter/merge_requests/502
* Allow changing Clutter debug flags at runtimeGeorges Basile Stavracas Neto2019-04-175-41/+108
| | | | | | | | | | | This way, we can literally pop up the Looking Glass and call: >>> Meta.add_clutter_debug_flags(Clutter.DebugFlag.FRAME_TIME, 0, 0) And measure specific actions or events on GNOME Shell. https://gitlab.gnome.org/GNOME/mutter/merge_requests/502
* clutter/stage: Account for frame timesGeorges Basile Stavracas Neto2019-04-171-24/+18
| | | | | | | | | | Instead of accumulating frames, simply calculate and debug-dump the time each frame takes to be drawn. Because we're using Clutter's debug machinery, it is structured and can be parsed by scripts. https://gitlab.gnome.org/GNOME/mutter/merge_requests/502
* Replace CLUTTER_SHOW_FPS by a proper debug flagGeorges Basile Stavracas Neto2019-04-175-56/+5
| | | | | | | | | Instead of CLUTTER_SHOW_FPS=1, it should be passed now CLUTTER_DEBUG=frame-time. Also remove the legacy code related to the FPS counter. https://gitlab.gnome.org/GNOME/mutter/merge_requests/502
* shaped-texture: Use draw_rectangle() for full paintsRobert Mader2019-04-171-5/+4
| | | | | | | | This reverts a change introduced in edfe5cc3 to use `paint_clipped_rectangle()` instead of `cogl_framebuffer_draw_rectangle()` for full paints as it contained logic necessary for viewport src-rects. This is not longer the case. https://gitlab.gnome.org/GNOME/mutter/merge_requests/504
* shaped-texture: Use CoglMatrix for viewport src-rectRobert Mader2019-04-171-49/+47
| | | | | | | | | | This brings the viewport src-rect code in line with how we handle transforms, by applying a `CoglMatrix` to the pipeline instead of changing the paint logic. It also fixes not-y-inverted textures in combination with transforms. https://gitlab.gnome.org/GNOME/mutter/merge_requests/504
* shaped-texture: Add checks to viewport reset functionsRobert Mader2019-04-171-0/+6
| | | | | | | | The set and reset functions are unconditionally called on every commit. Add missings checks to the reset functions to bail out if nothing changed. https://gitlab.gnome.org/GNOME/mutter/merge_requests/504
* cogl/texture-2d: Remove notes about COGL_FEATURE_ID_TEXTURE_NPOTRobert Mader2019-04-171-25/+0
| | | | | | | | NPOT capabilities were made madatory in OpenGL 2.0 and GLES 2.0, so let's stop encouraging developers to write new code with checks for it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/467
* cogl: Bump minimum GLES version to 2.0Adam Jackson2019-04-171-25/+21
| | | | | | | This is already effectively true because there is only a GLSL backend. It also implies OES_texture_npot. https://gitlab.gnome.org/GNOME/mutter/merge_requests/489
* cogl: Bump minimum GL version to 2.1Adam Jackson2019-04-171-124/+31
| | | | | | | | | We already effectively require GLSL, because there's no fixed-function backend anymore. OpenGL 2.0 drivers don't really exist in the wild, so just go ahead and require 2.1 or better. 2.1 implies GLSL 1.20 or better, so simplify that as well. https://gitlab.gnome.org/GNOME/mutter/merge_requests/489
* cogl: Remove color write masks from the framebuffer and pipeline APIAdam Jackson2019-04-1717-407/+8
| | | | | | | The only thing using this is its own tests, and it's difficult to imagine a real use for it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/468
* cogl: Remove viewport scissor workaroundAdam Jackson2019-04-174-120/+4
| | | | | | | | | | | | | | | This is effectively a revert of: commit 6cfc93f26f64c506922bf119d5079d83de7543d2 Author: Robert Bragg <robert@linux.intel.com> Date: Tue Oct 2 11:44:00 2012 +0100 clip-stack: workaround intel gen6 viewport clip bug It's been over six years, if this bug is still present we should just fix Mesa already. https://gitlab.gnome.org/GNOME/mutter/merge_requests/481
* Bump version to 3.32.13.32.1Florian Müllner2019-04-172-1/+31
| | | | Update NEWS.
* display: Fix inconsistent behavior with demand attentionOlivier Fourdan2019-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When focus stealing prevention kicks in, mutter would set the demand attention flag on the window. Focus stealing prevention would also prevent the window from being raised and focused, which is expected as its precisely its purpose. Yet, when that occurs, the user expects the window which has just been prevented from being focused to be the next one in the MRU list, so that pressing [Alt]-[Tab] would raise and give focus to that window. This works fine when the window is placed on the primary monitor, but not when placed on another monitor, in which case the window which has been denied focus is placed ahead of the MRU list and pressing [Alt]-[Tab] would leave the focus on the current window. This is because of a mechanism in `meta_display_get_tab_list()` which forces the windows with the demand attention flag set to be placed first in the MRU list when they're placed on a workspace different from the current one. But because workspaces apply only to the primary monitor (by default), the windows placed on other outputs have their workspace set to `NULL` which forces them ahead of the MRU list by mistake. Fix this by using the appropriate `meta_window_located_on_workspace() function to check if the window is on another workspace. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/523
* core: Emit MetaStartupNotification::changed on sequence completionCarlos Garnacho2019-04-171-0/+12
| | | | | | | This way handlers that want to know the get_complete() status will be able to do so without further delays. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/541
* core: Add MetaStartupSequence::complete signalCarlos Garnacho2019-04-171-5/+16
| | | | | | It was a vfunc so far, but we want things subscribing to it. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/541
* core: Account for completed sequences in feedback updatesCarlos Garnacho2019-04-171-1/+15
| | | | | | | | The sequences may stay completed in the list (eg. pending a focus request), it's then confusing to show the "wait" cursor icon until they are really gone. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/541
* core: Fix differing sequence timestamp precision expectationsCarlos Garnacho2019-04-172-5/+5
| | | | | | | | | Calculations were being done at places accounting on usec precision, however those are still treated as having msec precision at places. Let's consolidate for the latter since it requires less changes across the board and usec precision doesn't buy us anything here. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/541
* wayland/output: Set user data of xdg_output resourceOlivier Fourdan2019-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | mutter would randomly crash in `send_xdg_output_events()` when changing the fractional scaling: wl_resource_post_event () zxdg_output_v1_send_logical_size () send_xdg_output_events () wayland_output_update_for_output () meta_wayland_compositor_update_outputs () on_monitors_changed () g_closure_invoke () signal_emit_unlocked_R () g_signal_emit_valist () _signal_emit () meta_monitor_manager_notify_monitors_changed () meta_monitor_manager_rebuild () This is because the xdg-output resource got freed but wasn't removed from the list of resources. Fix this by setting the user data of the xdg-output resource to the corresponding `MetaWaylandOutput` so that the xdg-output resource destructor can remove it from the list of resources. https://gitlab.gnome.org/GNOME/mutter/merge_requests/538
* keybindings: Stop keybinding if a touch happens while Super is pressedJonas Dreßler2019-04-151-0/+2
| | | | | | | | | | | | | | We use the combination of pressing Super and clicking+moving the mouse to drag windows around and we also support pressing Super and using the touchscreen to drag windows. Since we don't want to show the overview when the Super key was used to initiate a window drag, prevent showing the overview in case a TOUCH_BEGIN or TOUCH_END event happened during the key was pressed. Fixes https://gitlab.gnome.org/GNOME/mutter/issues/228 https://gitlab.gnome.org/GNOME/mutter/merge_requests/495
* cogl-winsys-glx: Fix frame notification race/leakDaniel van Vugt2019-04-121-29/+29
| | | | | | | | | | | | | | | | If a second `set_{sync,complete}_pending` was queued before the idle handler had flushed the first then one of them would be forgotten. It would stay queued forever and never emitted as a notification. This could happen repeatedly causing a slow leak. But worse still, `clutter-stage-cogl` would then have `pending_swaps` permanently stuck above zero preventing the presentation timing logic from being used. The problem is that a boolean can only count to one, but in some cases (triple buffering, whether intentional or accidental #334) we need it to count to two. So just change booleans to integers and count properly. https://gitlab.gnome.org/GNOME/mutter/merge_requests/216
* clutter/evdev: Toggle accessibility features from keyboardOlivier Fourdan2019-04-111-7/+7
| | | | | | | | | | | | | | | | | The keyboard accessibility setting "enable" is actually even more misleading that initially anticipated, as it does not control the entire keyboard accessibility feature, but just the "enable by keyboard" feature, i.e. being able to enable or disable stickykeys or slowkeys using various keyboard actions. Yet the accessibility features should still work even if the "enable" setting is unset, those can be controlled by the accessibility menu in GNOME Shell for example. Change the clutter/evdev implementation to match that behavior as found in the x11 backend, so both backends are now consistent. https://gitlab.gnome.org/GNOME/mutter/merge_requests/531
* clutter/device-manager: Small code cleanupOlivier Fourdan2019-04-111-7/+1
| | | | | | | Use a `memcmp()` instead of checking every field in the structure to be equal, it's both faster and less error prone. https://gitlab.gnome.org/GNOME/mutter/merge_requests/531
* renderer/native: Check primary GPU supports EGLPekka Paalanen2019-04-111-3/+28
| | | | | | | | Since "renderer/native: make EGL initialization failure not fatal" it is possible, under specific failure conditions, to end up with a primary GPU whose EGL initialization failed. That cannot work. https://gitlab.gnome.org/GNOME/mutter/merge_requests/521
* renderer/native: Make EGL initialization failure not fatalPekka Paalanen2019-04-111-22/+40
| | | | | | | | | | | | | | | | | | | | | | The failure to initialize EGL does not necessarily mean the KMS device cannot be used. The device could still be used as a "secondary GPU" with the CPU copy mode. If meta_renderer_native_create_renderer_gpu_data () fails, meta_renderer_native_get_gpu_data () will return NULL, which may cause crashes. This patch removes most of the failures, but does not fix the NULL dereferences that will still happen if creating gpu data fails. This patch reorders create_renderer_gpu_data_gbm () so that it fails hard only if GBM device cannot be created, and otherwise always returns an initialized gpu data structure. Users of the gpu data structure are responsible for checking egl_display validity. The GBM device creation failure is a hard failure because presumably GBM is necessary for cursors. Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/542 https://gitlab.gnome.org/GNOME/mutter/merge_requests/521
* renderer-native: Freeze frames while retrying to page flipJonas Ådahl2019-04-021-2/+15
| | | | | | | | | | | We're currently always waiting for unfinished page flips before flipping again. This is awkward when we are in an asynchronous retry-page-flip loop, as we can synchronously wait for any KMS page flip event. To avoid ending up with such situations, just freeze the frame clock while we're retrying, then thaw it when we succeded. https://gitlab.gnome.org/GNOME/mutter/merge_requests/506
* renderer-native: Add helper to get backend from rendererJonas Ådahl2019-04-021-3/+10
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/506
* backend: Add API to freeze/thaw frame clockJonas Ådahl2019-04-022-0/+22
| | | | | | | It's just a thin wrapper around the ClutterStage API, with the intention to hide the awkward nest of interdependent backends. https://gitlab.gnome.org/GNOME/mutter/merge_requests/506
* renderer-native: Fake page flipping slower when power savingJonas Ådahl2019-04-024-29/+102
| | | | | | | | | | | | We rely on the frame clock to compress input events, thus if the frame clock stops, input events are not dispatched. At the same time, there is no reason to redraw at a full frame rate, as nothing will be presented anyway, so slow down to 10Hz (compared to the most common 60Hz). Note that we'll only actually reach 10Hz if there is an active animation being displayed, which won't happen e.g. if there is a screen shield in the way. https://gitlab.gnome.org/GNOME/mutter/merge_requests/506
* renderer-native: Fake page flipped if power saving when retryingJonas Ådahl2019-04-021-11/+40
| | | | | | | | | | | | | | | | | | When we're in a page-flip retry loop due to the FIFO being full (drmModePageFlip() failing with EBUSY), we should not continue to try when starting to power save, as that means we're blocking new frames, which itself blocks input events due to them being compressed using the frame clock. We'd also hit an assert assuming we only try to page flip when not power saving. Thus, fake we flipped if we ended up reaching a power saving state while retrying. Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/509 https://gitlab.gnome.org/GNOME/mutter/merge_requests/506
* renderer-native: Fix page flip retry timeout calculationJonas Ådahl2019-04-021-2/+2
| | | | | | | | | It tried to add a (implicitly casted) float to a uint64_t, and due to floating point precision issues resulted in timestamps intended to be in the future to actually be in the past. Fix this by first casting the delay to an uint64_t, then add it to the time stamp. https://gitlab.gnome.org/GNOME/mutter/merge_requests/506
* monitor-manager: Clean up DPMS state trackingJonas Ådahl2019-04-027-48/+120
| | | | | | | | | | | | | | DPMS is configured from a bit all over the place: via D-Bus, via X11 and when reading the current KMS state. Each of these places did it slightly differently, directly poking at the field in MetaMonitorManager. To make things a bit more managable, move the field into a new MetaMonitorManagerPrivate, and add helpers to get and set the current value. Prior to this, there were for example situations where the DPMS setting was changed, but without signal listeners being notified about it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/506
* ci: Blacklist .c and .h in the commit message subject prefixJonas Ådahl2019-04-021-0/+5
| | | | | | `boxes.c: Do that` should be just `boxes: Do that`. https://gitlab.gnome.org/GNOME/mutter/merge_requests/519
* ci: Nag about invalid commit message subject prefixesJonas Ådahl2019-04-021-1/+22
| | | | | | | | | | | | Prefixes use an abbreviated form of the module or section being changed. For example, changes to MetaBackend/meta-backend.c are prefixed with `backend:` and generic changes to src/x11/ are prefixed `x11:`. This extra nit picking check is meant to avoid using non-abbreviated prefixes, e.g. `MetaBackend:`, or `meta-backend:`, other prefixes are Currently consisting of only a "blacklist". https://gitlab.gnome.org/GNOME/mutter/merge_requests/519
* backends/native: Move underscan setting to MetaOutputKmsJonas Ådahl2019-04-023-95/+59
| | | | | | | | | | | | The 'underscan' property is a drm connector property, not a CRTC property, so we would never find it. We also didn't advertise support for the feature, meaning even if it was on the CRTC, Settings wouldn't know about it. Fix this by moving the property to where it belongs: in MetaOutputKms, and properly advertise support for it if the property is found. https://gitlab.gnome.org/GNOME/mutter/merge_requests/507
* cogl/texture: Implement is_get_data_supported on GLES texturesHeiher2019-04-021-1/+7
| | | | https://gitlab.gnome.org/GNOME/mutter/merge_requests/515
* launch-context: Swap reversed timestamp/workspaceDaniel van Vugt2019-04-011-2/+2
| | | | | | The parameters had been mixed up for X11 sessions. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/505
* Updated Spanish translationDaniel Mustieles2019-04-011-18/+18
|
* clutter: Fix check for keyboard a11y featuresCarlos Garnacho2019-03-281-1/+1
| | | | | | | The typo was actually toggling the feature on for those who had it disabled. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/529
* clutter-actor: Keep is_dirty unchanged for culled actorsDaniel van Vugt2019-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | In a multi-monitor setup there is a separate paint run for each monitor. If an actor doesn't intersect the first monitor painted then it is culled out for that monitor to save time. Unfortunately this would mean `clutter_actor_paint` was setting `is_dirty = FALSE` before the actor had yet been painted on any monitor. This meant that effects like `ClutterOffscreenEffect` were not receiving the flag `CLUTTER_EFFECT_PAINT_ACTOR_DIRTY` when they should have, and so would rightfully think they don't need to do a full internal invalidation. So `ClutterOffscreenEffect`, and probably other effects, did not repaint correctly unless on the first monitor in the list. The fix is to simply avoid setting `is_dirty = FALSE` on those paint runs where the actor has been culled out (`clutter_actor_continue_paint` wasn't called). It is only safe to clear the flag after `clutter_actor_continue_paint` has been called at least once per stage paint. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1049 https://gitlab.gnome.org/GNOME/mutter/merge_requests/511
* wayland/xdg-shell: Correct window menu position in logical layout modeJan Alexander Steffens (heftig)2019-03-262-2/+2
| | | | Fixes https://gitlab.gnome.org/GNOME/mutter/issues/527
* Update Croatian translationGoran Vidović2019-03-261-41/+48
|
* background: Shrink wallpaper using LINEAR_MIPMAP_LINEARDaniel van Vugt2019-03-261-1/+1
| | | | | | | | | | | | | | | | | Commit 8e9184b6 added filtering to avoid image jaggies when downscaling but used `LINEAR_MIPMAP_NEAREST`. In some situations this could lead to GL choosing a single lower resolution mipmap and then upscaling it, hence slightly blurry. We don't want to revert that change since it avoids aliasing jaggies, so let's use `LINEAR_MIPMAP_LINEAR` instead. This provides the highest quality filtering that GL can do and avoids the situation of GL using a single mipmap that's lower resolution than the screen. Now it will blend that one with the next mipmap which is higher resolution than the screen. This still avoids jaggies but also maintains 1px resolution. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1105 https://gitlab.gnome.org/GNOME/mutter/merge_requests/505
* renderer/native: Make the EGLStreams operate in mailbox modeJonas Ådahl2019-03-251-1/+1
| | | | | | | This means eglSwapBuffers() wont dead lock if there is an old buffer pending page flip. This could happen after e.g. mode changes or for other reasons. https://gitlab.gnome.org/GNOME/mutter/merge_requests/485
* renderer/native: Make EGLStream page flip errors non-fatalJonas Ådahl2019-03-251-7/+1
| | | | | | | Just continue rendering; we don't care if we were busy once, as it'll most likely work when we flip the next time. https://gitlab.gnome.org/GNOME/mutter/merge_requests/485
* wayland: Defer text_input.done on an idleCarlos Garnacho2019-03-251-6/+54
| | | | | | | With the right priority so we hopefully group events properly. https://gitlab.gnome.org/GNOME/mutter/merge_requests/499 https://gitlab.gnome.org/GNOME/gtk/issues/1365
* clutter: Drop no longer necessary APICarlos Garnacho2019-03-255-84/+0
| | | | | | | | | clutter_input_device_get_physical_size was just used for device mapping heuristics in MetaInputMapper. It now started using the info from udev on for both backends, so this means this clutter API is no longer necessary. https://gitlab.gnome.org/GNOME/mutter/issues/514
* backends: Use udev to determine absolute input devices' sizeCarlos Garnacho2019-03-251-1/+46
| | | | | | | | | | | Use the ID_INPUT_WIDTH_MM/ID_INPUT_HEIGHT_MM udev properties to figure out absolute input devices' physical size. This works across both backends, and requires less moving pieces to have it get the right results. Concretely, fixes size detection on X11/libinput, which makes touchscreen mapping go wrong. https://gitlab.gnome.org/GNOME/mutter/issues/514