Compare commits
23 Commits
wip/nielsd
...
3.32.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
189f71f5d1 | ||
|
|
0a3cddeecf | ||
|
|
ee92e4fe13 | ||
|
|
6933ce0976 | ||
|
|
f9d6627fe0 | ||
|
|
668c44e66b | ||
|
|
3495a43810 | ||
|
|
9a795d3d0f | ||
|
|
abc3fdcc65 | ||
|
|
4705a31049 | ||
|
|
e3f3274bbf | ||
|
|
d2ca5cc26b | ||
|
|
3de6f7ebfe | ||
|
|
38ff01d6d0 | ||
|
|
40103d6f41 | ||
|
|
ab7ef5f8bf | ||
|
|
2c1a951b6e | ||
|
|
6ec330ccfa | ||
|
|
20c1295a33 | ||
|
|
fa4a787386 | ||
|
|
85b734fde8 | ||
|
|
28419cdedf | ||
|
|
3b46a8cd70 |
41
NEWS
41
NEWS
@@ -1,3 +1,44 @@
|
||||
3.32.2
|
||||
======
|
||||
* Disable mouse keys with Numlock on [Olivier; #530]
|
||||
* Fix crash when restarting on X11 [Marco; #576]
|
||||
* Fix mapping of touchscreens that don't report dimensions [Carlos; #581]
|
||||
* Fix spurious idle signals that prevent session unblank [Jonas; !543]
|
||||
* Misc. bug fixes and cleanups [Olivier, Marco, Carlos; !552, !557, #586]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Olivier Fourdan, Carlos Garnacho, Marco Trevisan (Treviño)
|
||||
|
||||
3.32.1
|
||||
======
|
||||
* Fix fallback app menu on wayland [Florian; #493]
|
||||
* Fix elogind support [Tom; !491]
|
||||
* Fix startup notifications not timing out [Carlos; #501]
|
||||
* Fix keyboard accessibility toggle from keys
|
||||
[Olivier, Carlos; !501, #529, !531]
|
||||
* Fix touchscreen input on rotated displays [Carlos; #514]
|
||||
* Work around hangul text input bug [Carlos; #1365]
|
||||
* Fix blurry wallpaper scaling [Daniel; !505]
|
||||
* Fix placement of window menu when using fractional scaling [Jan; #527]
|
||||
* Fix repaint issues of offscreen effects on secondary monitors [Daniel; !511]
|
||||
* Fix windows not getting focus after launch [Daniel; #505]
|
||||
* Properly advertise support for 'underscan' property [Jonas; !507]
|
||||
* Improve power-saving handling [Jonas; !506]
|
||||
* Fix moving windows by super+touch [Jonas D.; !495]
|
||||
* Misc. bug fixes and cleanups [Benjamin, Florian, Adam, Marco, Pablo,
|
||||
Erik, Jonas, Heiher, Pekka, Daniel, Olivier, Carlos; !478, !475, !480,
|
||||
!482, #490, !488, #491, #480, !477, !496, !492, !485, !515, !519, !521,
|
||||
!216, !538, #541, #523]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Pablo Barciela, Benjamin Berg, Tom Briden, Jonas Dreßler,
|
||||
Olivier Fourdan, Carlos Garnacho, Jan Alexander Steffens (heftig), Heiher,
|
||||
Adam Jackson, Erik Kurzinger, Florian Müllner, Pekka Paalanen,
|
||||
Marco Trevisan (Treviño), Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Khaled Hosny [ar], Goran Vidović [hr], Daniel Mustieles [es]
|
||||
|
||||
3.32.0
|
||||
======
|
||||
* Fix deadlock when cancelling a theme sound [Andrea; !474]
|
||||
|
||||
@@ -550,13 +550,7 @@ static gboolean
|
||||
are_kbd_a11y_settings_equal (ClutterKbdA11ySettings *a,
|
||||
ClutterKbdA11ySettings *b)
|
||||
{
|
||||
return (a->controls == b->controls &&
|
||||
a->slowkeys_delay == b->slowkeys_delay &&
|
||||
a->debounce_delay == b->debounce_delay &&
|
||||
a->timeout_delay == b->timeout_delay &&
|
||||
a->mousekeys_init_delay == b->mousekeys_init_delay &&
|
||||
a->mousekeys_max_speed == b->mousekeys_max_speed &&
|
||||
a->mousekeys_accel_time == b->mousekeys_accel_time);
|
||||
return (memcmp (a, b, sizeof (ClutterKbdA11ySettings)) == 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -855,6 +855,14 @@ emulate_pointer_motion (ClutterInputDeviceEvdev *device,
|
||||
clutter_virtual_input_device_notify_relative_motion (device->mousekeys_virtual_device,
|
||||
time_us, dx_motion, dy_motion);
|
||||
}
|
||||
static gboolean
|
||||
is_numlock_active (ClutterInputDeviceEvdev *device)
|
||||
{
|
||||
ClutterSeatEvdev *seat = device->seat;
|
||||
return xkb_state_mod_name_is_active (seat->xkb,
|
||||
"Mod2",
|
||||
XKB_STATE_MODS_LOCKED);
|
||||
}
|
||||
|
||||
static void
|
||||
enable_mousekeys (ClutterInputDeviceEvdev *device)
|
||||
@@ -1013,6 +1021,10 @@ handle_mousekeys_press (ClutterEvent *event,
|
||||
if (!(event->key.flags & CLUTTER_EVENT_FLAG_SYNTHETIC))
|
||||
stop_mousekeys_move (device);
|
||||
|
||||
/* Do not handle mousekeys if NumLock is ON */
|
||||
if (is_numlock_active (device))
|
||||
return FALSE;
|
||||
|
||||
/* Button selection */
|
||||
switch (event->key.keyval)
|
||||
{
|
||||
@@ -1084,6 +1096,10 @@ static gboolean
|
||||
handle_mousekeys_release (ClutterEvent *event,
|
||||
ClutterInputDeviceEvdev *device)
|
||||
{
|
||||
/* Do not handle mousekeys if NumLock is ON */
|
||||
if (is_numlock_active (device))
|
||||
return FALSE;
|
||||
|
||||
switch (event->key.keyval)
|
||||
{
|
||||
case XKB_KEY_KP_0:
|
||||
@@ -1132,13 +1148,13 @@ clutter_input_device_evdev_process_kbd_a11y_event (ClutterEvent *e
|
||||
if (event->key.flags & CLUTTER_EVENT_FLAG_INPUT_METHOD)
|
||||
goto emit_event;
|
||||
|
||||
if (!(device_evdev->a11y_flags & CLUTTER_A11Y_KEYBOARD_ENABLED))
|
||||
goto emit_event;
|
||||
|
||||
if (event->type == CLUTTER_KEY_PRESS)
|
||||
handle_enablekeys_press (event, device_evdev);
|
||||
else
|
||||
handle_enablekeys_release (event, device_evdev);
|
||||
if (device_evdev->a11y_flags & CLUTTER_A11Y_KEYBOARD_ENABLED)
|
||||
{
|
||||
if (event->type == CLUTTER_KEY_PRESS)
|
||||
handle_enablekeys_press (event, device_evdev);
|
||||
else
|
||||
handle_enablekeys_release (event, device_evdev);
|
||||
}
|
||||
|
||||
if (device_evdev->a11y_flags & CLUTTER_A11Y_MOUSE_KEYS_ENABLED)
|
||||
{
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-settings-private.h"
|
||||
#include "clutter-xkb-a11y-x11.h"
|
||||
|
||||
G_DEFINE_TYPE (ClutterBackendX11, clutter_backend_x11, CLUTTER_TYPE_BACKEND)
|
||||
|
||||
@@ -276,6 +277,20 @@ clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11)
|
||||
_clutter_backend_add_event_translator (backend, translator);
|
||||
}
|
||||
|
||||
static void
|
||||
on_keymap_state_change (ClutterKeymapX11 *keymap_x11,
|
||||
gpointer data)
|
||||
{
|
||||
ClutterDeviceManager *device_manager = CLUTTER_DEVICE_MANAGER (data);
|
||||
ClutterKbdA11ySettings kbd_a11y_settings;
|
||||
|
||||
/* On keymaps state change, just reapply the current settings, it'll
|
||||
* take care of enabling/disabling mousekeys based on NumLock state.
|
||||
*/
|
||||
clutter_device_manager_get_kbd_a11y_settings (device_manager, &kbd_a11y_settings);
|
||||
clutter_device_manager_x11_apply_kbd_a11y_settings (device_manager, &kbd_a11y_settings);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_backend_x11_create_keymap (ClutterBackendX11 *backend_x11)
|
||||
{
|
||||
@@ -292,6 +307,11 @@ clutter_backend_x11_create_keymap (ClutterBackendX11 *backend_x11)
|
||||
backend = CLUTTER_BACKEND (backend_x11);
|
||||
translator = CLUTTER_EVENT_TRANSLATOR (backend_x11->keymap);
|
||||
_clutter_backend_add_event_translator (backend, translator);
|
||||
|
||||
g_signal_connect (backend_x11->keymap,
|
||||
"state-changed",
|
||||
G_CALLBACK (on_keymap_state_change),
|
||||
backend->device_manager);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -241,8 +241,13 @@ clutter_device_manager_x11_apply_kbd_a11y_settings (ClutterDeviceManager *devi
|
||||
}
|
||||
|
||||
/* mouse keys */
|
||||
if (set_xkb_ctrl (desc, kbd_a11y_settings->controls,
|
||||
CLUTTER_A11Y_MOUSE_KEYS_ENABLED, XkbMouseKeysMask | XkbMouseKeysAccelMask))
|
||||
if (clutter_keymap_get_num_lock_state (CLUTTER_KEYMAP (backend_x11->keymap)))
|
||||
{
|
||||
/* Disable mousekeys when NumLock is ON */
|
||||
desc->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask | XkbMouseKeysAccelMask);
|
||||
}
|
||||
else if (set_xkb_ctrl (desc, kbd_a11y_settings->controls,
|
||||
CLUTTER_A11Y_MOUSE_KEYS_ENABLED, XkbMouseKeysMask | XkbMouseKeysAccelMask))
|
||||
{
|
||||
gint mk_max_speed;
|
||||
gint mk_accel_time;
|
||||
|
||||
@@ -99,9 +99,9 @@ typedef struct _CoglOnscreenGLX
|
||||
CoglOnscreenXlib _parent;
|
||||
GLXDrawable glxwin;
|
||||
uint32_t last_swap_vsync_counter;
|
||||
gboolean pending_sync_notify;
|
||||
gboolean pending_complete_notify;
|
||||
gboolean pending_resize_notify;
|
||||
uint32_t pending_sync_notify;
|
||||
uint32_t pending_complete_notify;
|
||||
uint32_t pending_resize_notify;
|
||||
|
||||
GThread *swap_wait_thread;
|
||||
GQueue *swap_wait_queue;
|
||||
@@ -347,35 +347,35 @@ flush_pending_notifications_cb (void *data,
|
||||
{
|
||||
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
|
||||
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
|
||||
gboolean pending_sync_notify = glx_onscreen->pending_sync_notify;
|
||||
gboolean pending_complete_notify = glx_onscreen->pending_complete_notify;
|
||||
|
||||
/* If swap_region is called then notifying the sync event could
|
||||
* potentially immediately queue a subsequent pending notify so
|
||||
* we need to clear the flag before invoking the callback */
|
||||
glx_onscreen->pending_sync_notify = FALSE;
|
||||
glx_onscreen->pending_complete_notify = FALSE;
|
||||
|
||||
if (pending_sync_notify)
|
||||
while (glx_onscreen->pending_sync_notify > 0 ||
|
||||
glx_onscreen->pending_complete_notify > 0 ||
|
||||
glx_onscreen->pending_resize_notify > 0)
|
||||
{
|
||||
CoglFrameInfo *info = g_queue_peek_head (&onscreen->pending_frame_infos);
|
||||
if (glx_onscreen->pending_sync_notify > 0)
|
||||
{
|
||||
CoglFrameInfo *info =
|
||||
g_queue_peek_head (&onscreen->pending_frame_infos);
|
||||
|
||||
_cogl_onscreen_notify_frame_sync (onscreen, info);
|
||||
}
|
||||
_cogl_onscreen_notify_frame_sync (onscreen, info);
|
||||
glx_onscreen->pending_sync_notify--;
|
||||
}
|
||||
|
||||
if (pending_complete_notify)
|
||||
{
|
||||
CoglFrameInfo *info = g_queue_pop_head (&onscreen->pending_frame_infos);
|
||||
if (glx_onscreen->pending_complete_notify > 0)
|
||||
{
|
||||
CoglFrameInfo *info =
|
||||
g_queue_pop_head (&onscreen->pending_frame_infos);
|
||||
|
||||
_cogl_onscreen_notify_complete (onscreen, info);
|
||||
_cogl_onscreen_notify_complete (onscreen, info);
|
||||
cogl_object_unref (info);
|
||||
glx_onscreen->pending_complete_notify--;
|
||||
}
|
||||
|
||||
cogl_object_unref (info);
|
||||
}
|
||||
|
||||
if (glx_onscreen->pending_resize_notify)
|
||||
{
|
||||
_cogl_onscreen_notify_resize (onscreen);
|
||||
glx_onscreen->pending_resize_notify = FALSE;
|
||||
if (glx_onscreen->pending_resize_notify > 0)
|
||||
{
|
||||
_cogl_onscreen_notify_resize (onscreen);
|
||||
glx_onscreen->pending_resize_notify--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -417,7 +417,7 @@ set_sync_pending (CoglOnscreen *onscreen)
|
||||
NULL);
|
||||
}
|
||||
|
||||
glx_onscreen->pending_sync_notify = TRUE;
|
||||
glx_onscreen->pending_sync_notify++;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -440,7 +440,7 @@ set_complete_pending (CoglOnscreen *onscreen)
|
||||
NULL);
|
||||
}
|
||||
|
||||
glx_onscreen->pending_complete_notify = TRUE;
|
||||
glx_onscreen->pending_complete_notify++;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -533,7 +533,7 @@ notify_resize (CoglContext *context,
|
||||
NULL);
|
||||
}
|
||||
|
||||
glx_onscreen->pending_resize_notify = TRUE;
|
||||
glx_onscreen->pending_resize_notify++;
|
||||
|
||||
if (!xlib_onscreen->is_foreign_xwin)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project('mutter', 'c',
|
||||
version: '3.32.0',
|
||||
version: '3.32.2',
|
||||
meson_version: '>= 0.48.0',
|
||||
license: 'GPLv2+'
|
||||
)
|
||||
|
||||
@@ -316,11 +316,18 @@ idle_monitor_dispatch_timeout (GSource *source,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaIdleMonitorWatch *watch = (MetaIdleMonitorWatch *) user_data;
|
||||
int64_t now;
|
||||
int64_t ready_time;
|
||||
|
||||
now = g_source_get_time (source);
|
||||
ready_time = g_source_get_ready_time (source);
|
||||
if (ready_time > now)
|
||||
return G_SOURCE_CONTINUE;
|
||||
|
||||
_meta_idle_monitor_watch_fire (watch);
|
||||
g_source_set_ready_time (watch->timeout_source, -1);
|
||||
|
||||
return TRUE;
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
static GSourceFuncs idle_monitor_source_funcs = {
|
||||
|
||||
@@ -381,7 +381,7 @@ guess_candidates (MetaInputMapper *mapper,
|
||||
info->candidates[META_MATCH_SIZE] = matched_monitor;
|
||||
}
|
||||
|
||||
if (input->builtin)
|
||||
if (input->builtin || best == N_OUTPUT_MATCHES)
|
||||
{
|
||||
best = MIN (best, META_MATCH_IS_BUILTIN);
|
||||
find_builtin_output (mapper, &info->candidates[META_MATCH_IS_BUILTIN]);
|
||||
|
||||
@@ -1216,7 +1216,7 @@ load_keyboard_a11y_settings (MetaInputSettings *input_settings,
|
||||
ClutterInputDevice *device)
|
||||
{
|
||||
MetaInputSettingsPrivate *priv = meta_input_settings_get_instance_private (input_settings);
|
||||
ClutterKbdA11ySettings kbd_a11y_settings;
|
||||
ClutterKbdA11ySettings kbd_a11y_settings = { 0 };
|
||||
ClutterInputDevice *core_keyboard;
|
||||
guint i;
|
||||
|
||||
|
||||
@@ -3787,16 +3787,13 @@ gpu_kms_is_hardware_rendering (MetaRendererNative *renderer_native,
|
||||
return data->secondary.is_hardware_rendering;
|
||||
}
|
||||
|
||||
static MetaRendererNativeGpuData *
|
||||
create_renderer_gpu_data_gbm (MetaRendererNative *renderer_native,
|
||||
MetaGpuKms *gpu_kms,
|
||||
GError **error)
|
||||
static EGLDisplay
|
||||
init_gbm_egl_display (MetaRendererNative *renderer_native,
|
||||
struct gbm_device *gbm_device,
|
||||
GError **error)
|
||||
{
|
||||
MetaEgl *egl = meta_renderer_native_get_egl (renderer_native);
|
||||
struct gbm_device *gbm_device;
|
||||
EGLDisplay egl_display;
|
||||
int kms_fd;
|
||||
MetaRendererNativeGpuData *renderer_gpu_data;
|
||||
|
||||
if (!meta_egl_has_extensions (egl, EGL_NO_DISPLAY, NULL,
|
||||
"EGL_MESA_platform_gbm",
|
||||
@@ -3808,9 +3805,31 @@ create_renderer_gpu_data_gbm (MetaRendererNative *renderer_native,
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
G_IO_ERROR_FAILED,
|
||||
"Missing extension for GBM renderer: EGL_KHR_platform_gbm");
|
||||
return NULL;
|
||||
return EGL_NO_DISPLAY;
|
||||
}
|
||||
|
||||
egl_display = meta_egl_get_platform_display (egl,
|
||||
EGL_PLATFORM_GBM_KHR,
|
||||
gbm_device, NULL, error);
|
||||
if (egl_display == EGL_NO_DISPLAY)
|
||||
return EGL_NO_DISPLAY;
|
||||
|
||||
if (!meta_egl_initialize (egl, egl_display, error))
|
||||
return EGL_NO_DISPLAY;
|
||||
|
||||
return egl_display;
|
||||
}
|
||||
|
||||
static MetaRendererNativeGpuData *
|
||||
create_renderer_gpu_data_gbm (MetaRendererNative *renderer_native,
|
||||
MetaGpuKms *gpu_kms,
|
||||
GError **error)
|
||||
{
|
||||
struct gbm_device *gbm_device;
|
||||
int kms_fd;
|
||||
MetaRendererNativeGpuData *renderer_gpu_data;
|
||||
g_autoptr (GError) local_error = NULL;
|
||||
|
||||
kms_fd = meta_gpu_kms_get_fd (gpu_kms);
|
||||
|
||||
gbm_device = gbm_create_device (kms_fd);
|
||||
@@ -3822,26 +3841,25 @@ create_renderer_gpu_data_gbm (MetaRendererNative *renderer_native,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
egl_display = meta_egl_get_platform_display (egl,
|
||||
EGL_PLATFORM_GBM_KHR,
|
||||
gbm_device, NULL, error);
|
||||
if (egl_display == EGL_NO_DISPLAY)
|
||||
{
|
||||
gbm_device_destroy (gbm_device);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!meta_egl_initialize (egl, egl_display, error))
|
||||
return NULL;
|
||||
|
||||
renderer_gpu_data = meta_create_renderer_native_gpu_data (gpu_kms);
|
||||
renderer_gpu_data->renderer_native = renderer_native;
|
||||
renderer_gpu_data->gbm.device = gbm_device;
|
||||
renderer_gpu_data->mode = META_RENDERER_NATIVE_MODE_GBM;
|
||||
renderer_gpu_data->egl_display = egl_display;
|
||||
|
||||
renderer_gpu_data->egl_display = init_gbm_egl_display (renderer_native,
|
||||
gbm_device,
|
||||
&local_error);
|
||||
if (renderer_gpu_data->egl_display == EGL_NO_DISPLAY)
|
||||
{
|
||||
g_debug ("GBM EGL init for %s failed: %s",
|
||||
meta_gpu_kms_get_file_path (gpu_kms),
|
||||
local_error->message);
|
||||
|
||||
init_secondary_gpu_data_cpu (renderer_gpu_data);
|
||||
return renderer_gpu_data;
|
||||
}
|
||||
|
||||
init_secondary_gpu_data (renderer_gpu_data);
|
||||
|
||||
return renderer_gpu_data;
|
||||
}
|
||||
|
||||
@@ -4134,8 +4152,8 @@ on_gpu_added (MetaMonitorManager *monitor_manager,
|
||||
}
|
||||
|
||||
static MetaGpuKms *
|
||||
choose_primary_gpu (MetaMonitorManager *manager,
|
||||
MetaRendererNative *renderer_native)
|
||||
choose_primary_gpu_unchecked (MetaMonitorManager *manager,
|
||||
MetaRendererNative *renderer_native)
|
||||
{
|
||||
GList *gpus = meta_monitor_manager_get_gpus (manager);
|
||||
GList *l;
|
||||
@@ -4184,6 +4202,28 @@ choose_primary_gpu (MetaMonitorManager *manager,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static MetaGpuKms *
|
||||
choose_primary_gpu (MetaMonitorManager *manager,
|
||||
MetaRendererNative *renderer_native,
|
||||
GError **error)
|
||||
{
|
||||
MetaGpuKms *gpu_kms;
|
||||
MetaRendererNativeGpuData *renderer_gpu_data;
|
||||
|
||||
gpu_kms = choose_primary_gpu_unchecked (manager, renderer_native);
|
||||
renderer_gpu_data = meta_renderer_native_get_gpu_data (renderer_native,
|
||||
gpu_kms);
|
||||
if (renderer_gpu_data->egl_display == EGL_NO_DISPLAY)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"The GPU %s chosen as primary is not supported by EGL.",
|
||||
meta_gpu_kms_get_file_path (gpu_kms));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return gpu_kms;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_renderer_native_initable_init (GInitable *initable,
|
||||
GCancellable *cancellable,
|
||||
@@ -4207,7 +4247,10 @@ meta_renderer_native_initable_init (GInitable *initable,
|
||||
}
|
||||
|
||||
renderer_native->primary_gpu_kms = choose_primary_gpu (monitor_manager,
|
||||
renderer_native);
|
||||
renderer_native,
|
||||
error);
|
||||
if (!renderer_native->primary_gpu_kms)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ struct _MetaCompositor
|
||||
guint pre_paint_func_id;
|
||||
guint post_paint_func_id;
|
||||
|
||||
guint stage_presented_id;
|
||||
guint stage_after_paint_id;
|
||||
|
||||
gint64 server_time_query_time;
|
||||
gint64 server_time_offset;
|
||||
|
||||
|
||||
@@ -92,6 +92,10 @@ on_presented (ClutterStage *stage,
|
||||
ClutterFrameInfo *frame_info,
|
||||
MetaCompositor *compositor);
|
||||
|
||||
static void
|
||||
on_top_window_actor_destroyed (MetaWindowActor *window_actor,
|
||||
MetaCompositor *compositor);
|
||||
|
||||
static gboolean
|
||||
is_modal (MetaDisplay *display)
|
||||
{
|
||||
@@ -131,9 +135,31 @@ meta_switch_workspace_completed (MetaCompositor *compositor)
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor)
|
||||
{
|
||||
g_signal_handler_disconnect (compositor->stage,
|
||||
compositor->stage_after_paint_id);
|
||||
g_signal_handler_disconnect (compositor->stage,
|
||||
compositor->stage_presented_id);
|
||||
|
||||
compositor->stage_after_paint_id = 0;
|
||||
compositor->stage_presented_id = 0;
|
||||
compositor->stage = NULL;
|
||||
|
||||
clutter_threads_remove_repaint_func (compositor->pre_paint_func_id);
|
||||
clutter_threads_remove_repaint_func (compositor->post_paint_func_id);
|
||||
|
||||
if (compositor->top_window_actor)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (compositor->top_window_actor,
|
||||
on_top_window_actor_destroyed,
|
||||
compositor);
|
||||
compositor->top_window_actor = NULL;
|
||||
}
|
||||
|
||||
g_clear_pointer (&compositor->window_group, clutter_actor_destroy);
|
||||
g_clear_pointer (&compositor->top_window_group, clutter_actor_destroy);
|
||||
g_clear_pointer (&compositor->feedback_group, clutter_actor_destroy);
|
||||
g_clear_pointer (&compositor->windows, g_list_free);
|
||||
|
||||
if (compositor->have_x11_sync_object)
|
||||
meta_sync_ring_destroy ();
|
||||
}
|
||||
@@ -503,9 +529,10 @@ meta_compositor_manage (MetaCompositor *compositor)
|
||||
|
||||
compositor->stage = meta_backend_get_stage (backend);
|
||||
|
||||
g_signal_connect (compositor->stage, "presented",
|
||||
G_CALLBACK (on_presented),
|
||||
compositor);
|
||||
compositor->stage_presented_id =
|
||||
g_signal_connect (compositor->stage, "presented",
|
||||
G_CALLBACK (on_presented),
|
||||
compositor);
|
||||
|
||||
/* We use connect_after() here to accomodate code in GNOME Shell that,
|
||||
* when benchmarking drawing performance, connects to ::after-paint
|
||||
@@ -515,8 +542,9 @@ meta_compositor_manage (MetaCompositor *compositor)
|
||||
* connections to ::after-paint, connect() vs. connect_after() doesn't
|
||||
* matter.
|
||||
*/
|
||||
g_signal_connect_after (CLUTTER_STAGE (compositor->stage), "after-paint",
|
||||
G_CALLBACK (after_stage_paint), compositor);
|
||||
compositor->stage_after_paint_id =
|
||||
g_signal_connect_after (compositor->stage, "after-paint",
|
||||
G_CALLBACK (after_stage_paint), compositor);
|
||||
|
||||
clutter_stage_set_sync_delay (CLUTTER_STAGE (compositor->stage), META_SYNC_DELAY);
|
||||
|
||||
|
||||
@@ -2236,7 +2236,7 @@ meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaWindow *l_window = w->data;
|
||||
|
||||
if (l_window->wm_state_demands_attention &&
|
||||
l_window->workspace != workspace &&
|
||||
!meta_window_located_on_workspace (l_window, workspace) &&
|
||||
IN_TAB_CHAIN (l_window, type))
|
||||
tab_list = g_list_prepend (tab_list, l_window);
|
||||
}
|
||||
|
||||
@@ -2214,6 +2214,8 @@ meta_keybindings_process_event (MetaDisplay *display,
|
||||
{
|
||||
case CLUTTER_BUTTON_PRESS:
|
||||
case CLUTTER_BUTTON_RELEASE:
|
||||
case CLUTTER_TOUCH_BEGIN:
|
||||
case CLUTTER_TOUCH_END:
|
||||
keys->overlay_key_only_pressed = FALSE;
|
||||
return FALSE;
|
||||
|
||||
|
||||
@@ -110,13 +110,24 @@ static void
|
||||
meta_launch_context_constructed (GObject *object)
|
||||
{
|
||||
MetaLaunchContext *context = META_LAUNCH_CONTEXT (object);
|
||||
const char *x11_display, *wayland_display;
|
||||
|
||||
G_OBJECT_CLASS (meta_launch_context_parent_class)->constructed (object);
|
||||
|
||||
g_app_launch_context_setenv (G_APP_LAUNCH_CONTEXT (context),
|
||||
"DISPLAY", getenv ("DISPLAY"));
|
||||
g_app_launch_context_setenv (G_APP_LAUNCH_CONTEXT (context),
|
||||
"WAYLAND_DISPLAY", getenv ("WAYLAND_DISPLAY"));
|
||||
x11_display = getenv ("DISPLAY");
|
||||
wayland_display = getenv ("WAYLAND_DISPLAY");
|
||||
|
||||
if (x11_display)
|
||||
{
|
||||
g_app_launch_context_setenv (G_APP_LAUNCH_CONTEXT (context),
|
||||
"DISPLAY", x11_display);
|
||||
}
|
||||
|
||||
if (wayland_display)
|
||||
{
|
||||
g_app_launch_context_setenv (G_APP_LAUNCH_CONTEXT (context),
|
||||
"WAYLAND_DISPLAY", wayland_display);
|
||||
}
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* OpenOffice or whatever seems to stop launching - people
|
||||
* might decide they need to launch it again.
|
||||
*/
|
||||
#define STARTUP_TIMEOUT 15000000
|
||||
#define STARTUP_TIMEOUT_MS 15000
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -59,6 +59,12 @@ enum
|
||||
N_SEQ_PROPS
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SEQ_COMPLETE,
|
||||
N_SEQ_SIGNALS
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CHANGED,
|
||||
@@ -67,6 +73,7 @@ enum
|
||||
|
||||
static guint sn_signals[N_SIGNALS];
|
||||
static GParamSpec *sn_props[N_PROPS];
|
||||
static guint seq_signals[N_SEQ_SIGNALS];
|
||||
static GParamSpec *seq_props[N_SEQ_PROPS];
|
||||
|
||||
typedef struct
|
||||
@@ -106,12 +113,26 @@ G_DEFINE_TYPE_WITH_PRIVATE (MetaStartupSequence,
|
||||
|
||||
static void meta_startup_notification_ensure_timeout (MetaStartupNotification *sn);
|
||||
|
||||
static gboolean
|
||||
meta_startup_notification_has_pending_sequences (MetaStartupNotification *sn)
|
||||
{
|
||||
GSList *l;
|
||||
|
||||
for (l = sn->startup_sequences; l; l = l->next)
|
||||
{
|
||||
if (!meta_startup_sequence_get_completed (l->data))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_startup_notification_update_feedback (MetaStartupNotification *sn)
|
||||
{
|
||||
MetaDisplay *display = sn->display;
|
||||
|
||||
if (sn->startup_sequences != NULL)
|
||||
if (meta_startup_notification_has_pending_sequences (sn))
|
||||
{
|
||||
meta_topic (META_DEBUG_STARTUP,
|
||||
"Setting busy cursor\n");
|
||||
@@ -239,6 +260,14 @@ meta_startup_sequence_class_init (MetaStartupSequenceClass *klass)
|
||||
object_class->set_property = meta_startup_sequence_set_property;
|
||||
object_class->get_property = meta_startup_sequence_get_property;
|
||||
|
||||
seq_signals[SEQ_COMPLETE] =
|
||||
g_signal_new ("complete",
|
||||
META_TYPE_STARTUP_SEQUENCE,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaStartupSequenceClass, complete),
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
seq_props[PROP_SEQ_ID] =
|
||||
g_param_spec_string ("id",
|
||||
"ID",
|
||||
@@ -317,7 +346,6 @@ meta_startup_sequence_get_timestamp (MetaStartupSequence *seq)
|
||||
void
|
||||
meta_startup_sequence_complete (MetaStartupSequence *seq)
|
||||
{
|
||||
MetaStartupSequenceClass *klass;
|
||||
MetaStartupSequencePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_STARTUP_SEQUENCE (seq));
|
||||
@@ -327,10 +355,7 @@ meta_startup_sequence_complete (MetaStartupSequence *seq)
|
||||
return;
|
||||
|
||||
priv->completed = TRUE;
|
||||
klass = META_STARTUP_SEQUENCE_GET_CLASS (seq);
|
||||
|
||||
if (klass->complete)
|
||||
klass->complete (seq);
|
||||
g_signal_emit (seq, seq_signals[SEQ_COMPLETE], 0);
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -399,12 +424,22 @@ meta_startup_sequence_get_wmclass (MetaStartupSequence *seq)
|
||||
return priv->wmclass;
|
||||
}
|
||||
|
||||
static void
|
||||
on_sequence_completed (MetaStartupSequence *seq,
|
||||
MetaStartupNotification *sn)
|
||||
{
|
||||
meta_startup_notification_update_feedback (sn);
|
||||
g_signal_emit (sn, sn_signals[CHANGED], 0, seq);
|
||||
}
|
||||
|
||||
void
|
||||
meta_startup_notification_add_sequence (MetaStartupNotification *sn,
|
||||
MetaStartupSequence *seq)
|
||||
{
|
||||
sn->startup_sequences = g_slist_prepend (sn->startup_sequences,
|
||||
g_object_ref (seq));
|
||||
g_signal_connect (seq, "complete",
|
||||
G_CALLBACK (on_sequence_completed), sn);
|
||||
|
||||
meta_startup_notification_ensure_timeout (sn);
|
||||
meta_startup_notification_update_feedback (sn);
|
||||
@@ -425,10 +460,10 @@ collect_timed_out_foreach (void *element,
|
||||
|
||||
meta_topic (META_DEBUG_STARTUP,
|
||||
"Sequence used %" G_GINT64_FORMAT " ms vs. %d max: %s\n",
|
||||
elapsed, STARTUP_TIMEOUT,
|
||||
elapsed, STARTUP_TIMEOUT_MS,
|
||||
meta_startup_sequence_get_id (sequence));
|
||||
|
||||
if (elapsed > STARTUP_TIMEOUT)
|
||||
if (elapsed > STARTUP_TIMEOUT_MS)
|
||||
ctod->list = g_slist_prepend (ctod->list, sequence);
|
||||
}
|
||||
|
||||
@@ -440,7 +475,7 @@ startup_sequence_timeout (void *data)
|
||||
GSList *l;
|
||||
|
||||
ctod.list = NULL;
|
||||
ctod.now = g_get_monotonic_time ();
|
||||
ctod.now = g_get_monotonic_time () / 1000;
|
||||
g_slist_foreach (sn->startup_sequences,
|
||||
collect_timed_out_foreach,
|
||||
&ctod);
|
||||
@@ -494,6 +529,8 @@ meta_startup_notification_remove_sequence (MetaStartupNotification *sn,
|
||||
sn->startup_sequences = g_slist_remove (sn->startup_sequences, seq);
|
||||
meta_startup_notification_update_feedback (sn);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (seq, on_sequence_completed, sn);
|
||||
|
||||
if (sn->startup_sequences == NULL &&
|
||||
sn->startup_sequence_timeout != 0)
|
||||
{
|
||||
|
||||
@@ -624,14 +624,14 @@ meta_xdg_output_manager_get_xdg_output (struct wl_client *client,
|
||||
wl_resource_get_version (resource),
|
||||
id);
|
||||
|
||||
wl_resource_set_implementation (xdg_output_resource,
|
||||
&meta_xdg_output_interface,
|
||||
NULL, meta_xdg_output_destructor);
|
||||
|
||||
wayland_output = wl_resource_get_user_data (output);
|
||||
if (!wayland_output)
|
||||
return;
|
||||
|
||||
wl_resource_set_implementation (xdg_output_resource,
|
||||
&meta_xdg_output_interface,
|
||||
wayland_output, meta_xdg_output_destructor);
|
||||
|
||||
wayland_output->xdg_output_resources =
|
||||
g_list_prepend (wayland_output->xdg_output_resources, xdg_output_resource);
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ meta_startup_sequence_x11_new (SnStartupSequence *seq)
|
||||
{
|
||||
gint64 timestamp;
|
||||
|
||||
timestamp = sn_startup_sequence_get_timestamp (seq) * 1000;
|
||||
timestamp = sn_startup_sequence_get_timestamp (seq);
|
||||
return g_object_new (META_TYPE_STARTUP_SEQUENCE_X11,
|
||||
"id", sn_startup_sequence_get_id (seq),
|
||||
"icon-name", sn_startup_sequence_get_icon_name (seq),
|
||||
|
||||
Reference in New Issue
Block a user