Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package muffin for openSUSE:Factory checked in at 2024-08-13 13:23:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/muffin (Old) and /work/SRC/openSUSE:Factory/.muffin.new.7232 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "muffin" Tue Aug 13 13:23:48 2024 rev:32 rq:1193351 version:6.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/muffin/muffin.changes 2024-05-14 13:40:52.272077559 +0200 +++ /work/SRC/openSUSE:Factory/.muffin.new.7232/muffin.changes 2024-08-13 13:24:13.912715953 +0200 @@ -1,0 +2,18 @@ +Sun Aug 11 05:02:00 UTC 2024 - sb56637 <[email protected]> + +- update to 6.2.0: + * packaging: Forbid compilation if the symbols file is outdated + * packaging: Update symbols file + * Fix compile issue + * meta-input-settings-x11.c: Don't warn about receiving more values than expected from libinput. + * Fix segfault during Alt-Tab when window focus mode is either 'Sloppy' or 'Mouse' + * meta-crtc-xrandr.c: use nearest neighbor filter for integer randr scales + * meta-monitor-manager-xrandr.c: DeleteMonitor before SetMonitor + * meta-monitor-manager-xrandr.c: fix crtc disabling + * meta-monitor-manager-xrandr.c: fix screen size + * meta-monitor-manager-xrandr.c: screen size fixes + +- update to 6.0.1: + * meta-compositor-x11.c: Don't disable fractional scaling when unredirecting a fullscreen window + +------------------------------------------------------------------- Old: ---- muffin-6.0.1.tar.gz New: ---- muffin-6.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ muffin.spec ++++++ --- /var/tmp/diff_new_pack.DEjsDs/_old 2024-08-13 13:24:15.668789121 +0200 +++ /var/tmp/diff_new_pack.DEjsDs/_new 2024-08-13 13:24:15.668789121 +0200 @@ -21,7 +21,7 @@ %define typelib typelib-1_0-Muffin-0_0 %define _lto_cflags %{nil} Name: muffin -Version: 6.0.1 +Version: 6.2.0 Release: 0 Summary: Cinnamon Desktop default window manager License: GPL-2.0-or-later AND MIT ++++++ muffin-6.0.1.tar.gz -> muffin-6.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/clutter/clutter/clutter-mutter.h new/muffin-6.2.0/clutter/clutter/clutter-mutter.h --- old/muffin-6.0.1/clutter/clutter/clutter-mutter.h 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/clutter/clutter/clutter-mutter.h 2024-06-11 18:06:46.000000000 +0200 @@ -78,6 +78,11 @@ CLUTTER_EXPORT gboolean clutter_actor_has_damage (ClutterActor *actor); +CLUTTER_EXPORT +void clutter_stage_get_device_coords (ClutterStage *stage, + ClutterInputDevice *device, + ClutterEventSequence *sequence, + graphene_point_t *coords); #undef __CLUTTER_H_INSIDE__ #endif /* __CLUTTER_MUTTER_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/clutter/clutter/clutter-stage.c new/muffin-6.2.0/clutter/clutter/clutter-stage.c --- old/muffin-6.0.1/clutter/clutter/clutter-stage.c 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/clutter/clutter/clutter-stage.c 2024-06-11 18:06:46.000000000 +0200 @@ -99,6 +99,15 @@ graphene_point_t vertex[4]; } PickClipRecord; +typedef struct _PointerDeviceEntry +{ + ClutterStage *stage; + ClutterInputDevice *device; + ClutterEventSequence *sequence; + graphene_point_t coords; + ClutterActor *current_actor; +} PointerDeviceEntry; + struct _ClutterStagePrivate { /* the stage implementation */ @@ -147,6 +156,9 @@ gboolean needs_update; + GHashTable *pointer_devices; + GHashTable *touch_sequences; + guint redraw_pending : 1; guint is_cursor_visible : 1; guint throttle_motion_events : 1; @@ -195,6 +207,7 @@ static void clutter_stage_maybe_finish_queue_redraws (ClutterStage *stage); static void free_queue_redraw_entry (ClutterStageQueueRedrawEntry *entry); +static void free_pointer_device_entry (PointerDeviceEntry *entry); static void capture_view_into (ClutterStage *stage, gboolean paint, ClutterStageView *view, @@ -2010,6 +2023,9 @@ g_queue_foreach (priv->event_queue, (GFunc) clutter_event_free, NULL); g_queue_free (priv->event_queue); + g_hash_table_destroy (priv->pointer_devices); + g_hash_table_destroy (priv->touch_sequences); + g_free (priv->title); g_array_free (priv->paint_volume_stack, TRUE); @@ -2387,6 +2403,13 @@ priv->sync_delay = -1; priv->motion_events_enabled = TRUE; + priv->pointer_devices = + g_hash_table_new_full (NULL, NULL, + NULL, (GDestroyNotify) free_pointer_device_entry); + priv->touch_sequences = + g_hash_table_new_full (NULL, NULL, + NULL, (GDestroyNotify) free_pointer_device_entry); + clutter_actor_set_background_color (CLUTTER_ACTOR (self), &default_stage_color); @@ -4796,3 +4819,69 @@ *view_scale = scale; return TRUE; } + +static void +on_device_actor_reactive_changed (ClutterActor *actor, + GParamSpec *pspec, + PointerDeviceEntry *entry) +{ +} + +static void +on_device_actor_destroyed (ClutterActor *actor, + PointerDeviceEntry *entry) +{ + /* Simply unset the current_actor pointer here, there's no need to + * unset has_pointer or to disconnect any signals because the actor + * is gone anyway. + * Also, as soon as the next repaint happens, a repick should be triggered + * and the PointerDeviceEntry will get updated again, so no need to + * trigger a repick here. + */ + entry->current_actor = NULL; +} + + +static void +free_pointer_device_entry (PointerDeviceEntry *entry) +{ + if (entry->current_actor) + { + ClutterActor *actor = entry->current_actor; + + g_signal_handlers_disconnect_by_func (actor, + G_CALLBACK (on_device_actor_reactive_changed), + entry); + g_signal_handlers_disconnect_by_func (actor, + G_CALLBACK (on_device_actor_destroyed), + entry); + + _clutter_actor_set_has_pointer (actor, FALSE); + } + + g_free (entry); +} + +/** + * clutter_stage_get_device_coords: (skip): + */ +void +clutter_stage_get_device_coords (ClutterStage *stage, + ClutterInputDevice *device, + ClutterEventSequence *sequence, + graphene_point_t *coords) +{ + ClutterStagePrivate *priv = stage->priv; + PointerDeviceEntry *entry = NULL; + + g_return_if_fail (CLUTTER_IS_STAGE (stage)); + g_return_if_fail (device != NULL); + + if (sequence != NULL) + entry = g_hash_table_lookup (priv->touch_sequences, sequence); + else + entry = g_hash_table_lookup (priv->pointer_devices, device); + + if (entry && coords) + *coords = entry->coords; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/debian/changelog new/muffin-6.2.0/debian/changelog --- old/muffin-6.0.1/debian/changelog 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/debian/changelog 2024-06-11 18:06:46.000000000 +0200 @@ -1,3 +1,30 @@ +muffin (6.2.0) wilma; urgency=medium + + [ Clement Lefebvre ] + * packaging: Forbid compilation if the symbols file is outdated + * packaging: Update symbols file + + [ Leigh Scott ] + * Fix compile issue (#683) + * build: Use Xwayland pkg-config if available (#682) + + [ Michael Webster ] + * meta-input-settings-x11.c: Don't warn about receiving more values than expected from libinput. + + [ Rick Calixte ] + * Fix segfault during Alt-Tab when window focus mode is either 'Sloppy' or 'Mouse' (gdb backtrace attached) (#680) + + [ jknockel ] + * meta-crtc-xrandr.c: use nearest neighbor filter for integer randr scales (#692) + * meta-monitor-manager-xrandr.c: DeleteMonitor before SetMonitor (#693) + + [ Jeffrey Knockel ] + * meta-monitor-manager-xrandr.c: fix crtc disabling + * meta-monitor-manager-xrandr.c: fix screen size + * meta-monitor-manager-xrandr.c: screen size fixes + + -- Clement Lefebvre <[email protected]> Tue, 11 Jun 2024 17:06:29 +0100 + muffin (6.0.1) virginia; urgency=medium [ Michael Webster ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/debian/libmuffin0.symbols new/muffin-6.2.0/debian/libmuffin0.symbols --- old/muffin-6.0.1/debian/libmuffin0.symbols 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/debian/libmuffin0.symbols 2024-06-11 18:06:46.000000000 +0200 @@ -371,6 +371,7 @@ clutter_animation_set_mode@Base 5.3.0 clutter_animation_set_object@Base 5.3.0 clutter_animation_set_timeline@Base 5.3.0 + clutter_backend_egl_native_get_type@Base 6.0.0 clutter_backend_get_cogl_context@Base 5.3.0 clutter_backend_get_default_seat@Base 5.3.0 clutter_backend_get_font_options@Base 5.3.0 @@ -565,6 +566,7 @@ clutter_effect_get_type@Base 5.3.0 clutter_effect_paint_flags_get_type@Base 5.3.0 clutter_effect_queue_repaint@Base 5.3.0 + clutter_egl_get_egl_display@Base 6.0.0 clutter_event_add_filter@Base 5.3.0 clutter_event_copy@Base 5.3.0 clutter_event_flags_get_type@Base 5.3.0 @@ -1113,6 +1115,7 @@ clutter_stage_get_capture_final_size@Base 5.3.0 clutter_stage_get_color@Base 5.3.0 clutter_stage_get_default@Base 5.3.0 + clutter_stage_get_device_coords@Base 6.0.1 clutter_stage_get_frame_counter@Base 5.3.0 clutter_stage_get_key_focus@Base 5.3.0 clutter_stage_get_minimum_size@Base 5.3.0 @@ -1390,6 +1393,7 @@ clutter_virtual_input_device_notify_touch_down@Base 5.3.0 clutter_virtual_input_device_notify_touch_motion@Base 5.3.0 clutter_virtual_input_device_notify_touch_up@Base 5.3.0 + clutter_wayland_set_compositor_display@Base 6.0.0 clutter_x11_add_filter@Base 5.3.0 clutter_x11_filter_return_get_type@Base 5.3.0 clutter_x11_get_default_display@Base 5.3.0 @@ -1961,6 +1965,7 @@ cogl_texture_set_premultiplied@Base 5.3.0 cogl_texture_set_region@Base 5.3.0 cogl_texture_set_region_from_bitmap@Base 5.3.0 + cogl_wayland_display_set_compositor_display@Base 6.0.0 cogl_x11_onscreen_get_window_xid@Base 5.3.0 cogl_xlib_renderer_add_filter@Base 5.3.0 cogl_xlib_renderer_get_display@Base 5.3.0 @@ -2010,6 +2015,7 @@ cogl_path_copy@Base 5.3.0 cogl_path_get_gtype@Base 5.3.0 libmuffin.so.0 libmuffin0 #MINVER# + meta_activate_session@Base 6.0.0 meta_add_clutter_debug_flags@Base 5.3.0 meta_add_verbose_topic@Base 5.3.0 meta_backend_add_gpu@Base 5.3.0 @@ -2131,6 +2137,7 @@ meta_display_get_monitor_scale@Base 5.3.0 meta_display_get_n_monitors@Base 5.3.0 meta_display_get_pad_action_label@Base 5.3.0 + meta_display_get_pointer_window@Base 6.0.0 meta_display_get_primary_monitor@Base 5.3.0 meta_display_get_selection@Base 5.3.0 meta_display_get_size@Base 5.3.0 @@ -2147,6 +2154,7 @@ meta_display_list_windows@Base 5.3.0 meta_display_logical_index_to_xinerama_index@Base 5.3.0 meta_display_lookup_stack_id@Base 5.3.0 + meta_display_push_tile@Base 6.0.0 meta_display_remove_keybinding@Base 5.3.0 meta_display_request_pad_osd@Base 5.3.0 meta_display_set_cursor@Base 5.3.0 @@ -2491,6 +2499,7 @@ meta_selection_type_get_type@Base 5.3.0 meta_selection_unset_owner@Base 5.3.0 meta_set_gnome_wm_keybindings@Base 5.3.0 + meta_set_verbose@Base 6.0.0 meta_set_wm_name@Base 5.3.0 meta_settings_enable_experimental_feature@Base 5.3.0 meta_settings_get_font_dpi@Base 5.3.0 @@ -2558,6 +2567,11 @@ meta_verify_monitors_config@Base 5.3.0 meta_virtual_modifier_get_type@Base 5.3.0 meta_warning@Base 5.3.0 + meta_wayland_actor_surface_get_actor@Base 6.0.0 + meta_wayland_compositor_get_default@Base 6.0.0 + meta_wayland_get_wayland_display_name@Base 6.0.0 + meta_wayland_get_xwayland_display_name@Base 6.0.0 + meta_wayland_override_display_name@Base 6.0.0 meta_window_activate@Base 5.3.0 meta_window_activate_with_workspace@Base 5.3.0 meta_window_actor_get_image@Base 5.3.0 @@ -2737,3 +2751,4 @@ meta_x11_error_trap_push@Base 5.3.0 meta_x11_init_gdk_display@Base 5.3.0 meta_xrandr_rotation_get_type@Base 5.3.0 + meta_xwayland_override_display_number@Base 6.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/debian/rules new/muffin-6.2.0/debian/rules --- old/muffin-6.0.1/debian/rules 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/debian/rules 2024-06-11 18:06:46.000000000 +0200 @@ -2,6 +2,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,--as-needed +export DPKG_GENSYMBOLS_CHECK_LEVEL = 2 %: dh $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/meson.build new/muffin-6.2.0/meson.build --- old/muffin-6.0.1/meson.build 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/meson.build 2024-06-11 18:06:46.000000000 +0200 @@ -1,8 +1,4 @@ -project('muffin', 'c', - version: '6.0.1', - meson_version: '>=0.56.0', - license: 'GPLv2+' -) +project('muffin', 'c', version : '6.2.0', meson_version : '>=0.56.0', license : 'GPLv2+') mutter_plugin_api_version = '3' @@ -381,9 +377,15 @@ have_xwayland_initfd = false if have_wayland + xwayland_dep = dependency('xwayland', required: false) + xwayland_path = get_option('xwayland_path') if xwayland_path == '' - xwayland_path = find_program('Xwayland').path() + if xwayland_dep.found() + xwayland_path = xwayland_dep.get_pkgconfig_variable('xwayland') + else + xwayland_path = find_program('Xwayland').full_path() + endif endif cdata.set_quoted('XWAYLAND_PATH', xwayland_path) @@ -398,9 +400,15 @@ # For Xwayland -initfd usage use_initfd = get_option('xwayland_initfd') + if xwayland_dep.found() + xwayland_supports_initfd = xwayland_dep.get_pkgconfig_variable('have_initfd') == 'true' + else + xwayland_options = run_command(xwayland_path, '-help') + xwayland_supports_initfd = xwayland_options.stderr().contains('-initfd') + endif + if use_initfd.auto() - xwayland_options = run_command([xwayland_path, '-help'], check: true) - have_xwayland_initfd = xwayland_options.stderr().contains('-initfd') + have_xwayland_initfd = xwayland_supports_initfd else have_xwayland_initfd = use_initfd.enabled() endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/src/backends/x11/meta-crtc-xrandr.c new/muffin-6.2.0/src/backends/x11/meta-crtc-xrandr.c --- old/muffin-6.0.1/src/backends/x11/meta-crtc-xrandr.c 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/src/backends/x11/meta-crtc-xrandr.c 2024-06-11 18:06:46.000000000 +0200 @@ -135,6 +135,7 @@ DOUBLE_TO_FIXED (0), DOUBLE_TO_FIXED (1), DOUBLE_TO_FIXED (0), DOUBLE_TO_FIXED (0), DOUBLE_TO_FIXED (0), DOUBLE_TO_FIXED (1) }; + float integer_scale; if (!(meta_monitor_manager_get_capabilities (monitor_manager) & META_MONITOR_MANAGER_CAPABILITY_NATIVE_OUTPUT_SCALING)) @@ -145,9 +146,19 @@ if (fabsf (scale - 1.0f) > 0.001) { - scale_filter = FilterGood; - transformation.matrix11 = DOUBLE_TO_FIXED (1.0 / scale); - transformation.matrix22 = DOUBLE_TO_FIXED (1.0 / scale); + integer_scale = roundf (scale); + if (fabsf (scale - integer_scale) > 0.001) + { + scale_filter = FilterGood; + transformation.matrix11 = DOUBLE_TO_FIXED (1.0 / scale); + transformation.matrix22 = DOUBLE_TO_FIXED (1.0 / scale); + } + else /* if integer multiple then use nearest neighbor filter */ + { + scale_filter = "nearest"; + transformation.matrix11 = DOUBLE_TO_FIXED (1.0 / integer_scale); + transformation.matrix22 = DOUBLE_TO_FIXED (1.0 / integer_scale); + } } else scale_filter = FilterFast; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/src/backends/x11/meta-input-settings-x11.c new/muffin-6.2.0/src/backends/x11/meta-input-settings-x11.c --- old/muffin-6.0.1/src/backends/x11/meta-input-settings-x11.c 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/src/backends/x11/meta-input-settings-x11.c 2024-06-11 18:06:46.000000000 +0200 @@ -126,9 +126,6 @@ if (rc == Success && type_ret == type && format_ret == format && nitems_ret >= nitems) { - if (nitems_ret > nitems) - g_warning ("Property '%s' for device '%s' returned %lu items, expected %lu", - property, clutter_input_device_get_device_name (device), nitems_ret, nitems); return data_ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/src/backends/x11/meta-monitor-manager-xrandr.c new/muffin-6.2.0/src/backends/x11/meta-monitor-manager-xrandr.c --- old/muffin-6.0.1/src/backends/x11/meta-monitor-manager-xrandr.c 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/src/backends/x11/meta-monitor-manager-xrandr.c 2024-06-11 18:06:46.000000000 +0200 @@ -550,7 +550,7 @@ MetaX11ScaleMode scale_mode = meta_settings_get_x11_scale_mode (settings); unsigned i, valid_crtcs; GList *l; - int width, height; + int width, height, scaled_width, scaled_height; float max_scale; float avg_screen_scale; gboolean have_scaling; @@ -563,6 +563,7 @@ /* Compute the new size of the screen (framebuffer) */ max_scale = get_maximum_crtc_info_scale (crtcs, n_crtcs); width = 0; height = 0; + scaled_width = 0; scaled_height = 0; avg_screen_scale = 0; valid_crtcs = 0; for (i = 0; i < n_crtcs; i++) @@ -578,6 +579,13 @@ if (have_scaling && scale_mode == META_X11_SCALE_MODE_UI_DOWN) scale = (ceilf (max_scale) / crtc_info->scale) * crtc_info->scale; + else + { + scaled_width = MAX (scaled_width, crtc_info->layout.origin.x + + crtc_info->layout.size.width * crtc_info->scale); + scaled_height = MAX (scaled_height, crtc_info->layout.origin.y + + crtc_info->layout.size.height * crtc_info->scale); + } width = MAX (width, (int) roundf (crtc_info->layout.origin.x + crtc_info->layout.size.width * scale)); @@ -609,7 +617,7 @@ y2 = (int) roundf (crtc_config->layout.origin.y + crtc_config->layout.size.height); - if (!crtc_info->mode || x2 > width || y2 > height) + if (!crtc_info->mode || width < scaled_width || height < scaled_height || x2 > width || y2 > height) { xrandr_set_crtc_config (manager_xrandr, crtc, @@ -661,7 +669,7 @@ if (!n_crtcs) goto out; - if (width > manager->screen_width || height > manager->screen_height) + if (width > 0 && height > 0) { meta_monitor_manager_xrandr_update_screen_size (manager_xrandr, width, height, @@ -783,13 +791,6 @@ output->is_primary = FALSE; } - if (width > 0 && height > 0) - { - meta_monitor_manager_xrandr_update_screen_size (manager_xrandr, - width, height, - avg_screen_scale); - } - out: XUngrabServer (manager_xrandr->xdisplay); XFlush (manager_xrandr->xdisplay); @@ -846,7 +847,7 @@ if (!crtc || !crtc->config) continue; - if (!have_scaling || scale_mode != META_X11_SCALE_MODE_UI_DOWN) + if (!have_scaling) { /* When scaling up we should not reduce the screen size, or X will * fail miserably, while we must do it when scaling down, in order to @@ -1082,6 +1083,8 @@ GList *outputs; GList *l; int i; + xcb_connection_t *xcb_conn; + xcb_void_cookie_t cookie; if (!(meta_monitor_manager_get_capabilities (manager) & META_MONITOR_MANAGER_CAPABILITY_TILING)) @@ -1117,6 +1120,11 @@ xrandr_monitor_info->outputs[i] = output->winsys_id; } + xcb_conn = XGetXCBConnection (manager_xrandr->xdisplay); + cookie = xcb_randr_delete_monitor_checked (xcb_conn, + DefaultRootWindow (manager_xrandr->xdisplay), + name_atom); + free (xcb_request_check (xcb_conn, cookie)); /* ignore DeleteMonitor errors */ XRRSetMonitor (manager_xrandr->xdisplay, DefaultRootWindow (manager_xrandr->xdisplay), xrandr_monitor_info); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/src/core/prefs.c new/muffin-6.2.0/src/core/prefs.c --- old/muffin-6.0.1/src/core/prefs.c 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/src/core/prefs.c 2024-06-11 18:06:46.000000000 +0200 @@ -2258,7 +2258,7 @@ } else { - strokes = g_strdupv (bindings); + strokes = g_strdupv((gchar **)bindings); } queue_changed (META_PREF_KEYBINDINGS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/src/wayland/meta-wayland-pointer.c new/muffin-6.2.0/src/wayland/meta-wayland-pointer.c --- old/muffin-6.0.1/src/wayland/meta-wayland-pointer.c 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/src/wayland/meta-wayland-pointer.c 2024-06-11 18:06:46.000000000 +0200 @@ -618,10 +618,13 @@ ClutterActor *actor; MetaWaylandSurface *surface; - if (for_event) - actor = clutter_event_get_source (for_event); + if (!for_event) + return; + + if (clutter_event_type (for_event) == CLUTTER_LEAVE) + actor = clutter_event_get_related (for_event); else - actor = clutter_input_device_get_pointer_actor (pointer->device); + actor = clutter_event_get_source (for_event); if (META_IS_SURFACE_ACTOR_WAYLAND (actor)) { @@ -938,6 +941,7 @@ if (surface != NULL) { + ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend)); struct wl_client *client = wl_resource_get_client (surface->resource); graphene_point_t pos; MetaWindow *focus_window; @@ -949,7 +953,7 @@ G_CALLBACK (focus_surface_destroyed), pointer); - clutter_input_device_get_coords (pointer->device, NULL, &pos); + clutter_stage_get_device_coords (stage, pointer->device, NULL, &pos); focus_window = meta_wayland_surface_get_window (pointer->focus_surface); if (focus_window) @@ -960,7 +964,7 @@ pointer->focus_client = meta_wayland_pointer_get_pointer_client (pointer, client); - if (pointer->focus_client) + if (pointer->focus_client && pointer->focus_surface) { pointer->focus_serial = meta_wayland_input_device_next_serial (input_device); @@ -1054,10 +1058,12 @@ wl_fixed_t *sx, wl_fixed_t *sy) { + MetaBackend *backend = meta_get_backend (); + ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend)); float xf = 0.0f, yf = 0.0f; graphene_point_t pos; - clutter_input_device_get_coords (pointer->device, NULL, &pos); + clutter_stage_get_device_coords (stage, pointer->device, NULL, &pos); meta_wayland_surface_get_relative_coordinates (surface, pos.x, pos.y, &xf, &yf); *sx = wl_fixed_from_double (xf); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/muffin-6.0.1/src/wayland/meta-wayland-surface.c new/muffin-6.2.0/src/wayland/meta-wayland-surface.c --- old/muffin-6.0.1/src/wayland/meta-wayland-surface.c 2023-12-28 12:53:15.000000000 +0100 +++ new/muffin-6.2.0/src/wayland/meta-wayland-surface.c 2024-06-11 18:06:46.000000000 +0200 @@ -1566,12 +1566,15 @@ float *sx, float *sy) { - MetaWaylandSurfaceRoleClass *surface_role_class = - META_WAYLAND_SURFACE_ROLE_GET_CLASS (surface->role); + if (surface != NULL && surface->role) + { + MetaWaylandSurfaceRoleClass *surface_role_class = + META_WAYLAND_SURFACE_ROLE_GET_CLASS (surface->role); - surface_role_class->get_relative_coordinates (surface->role, - abs_x, abs_y, - sx, sy); + surface_role_class->get_relative_coordinates (surface->role, + abs_x, abs_y, + sx, sy); + } } void
