Compare commits
10 Commits
wip/kms-co
...
3.32.2
Author | SHA1 | Date | |
---|---|---|---|
189f71f5d1 | |||
0a3cddeecf | |||
ee92e4fe13 | |||
6933ce0976 | |||
f9d6627fe0 | |||
668c44e66b | |||
3495a43810 | |||
9a795d3d0f | |||
abc3fdcc65 | |||
4705a31049 |
11
NEWS
11
NEWS
@ -1,3 +1,14 @@
|
||||
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]
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -1,5 +1,5 @@
|
||||
project('mutter', 'c',
|
||||
version: '3.32.1',
|
||||
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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 *
|
||||
|
Reference in New Issue
Block a user