Compare commits

...

16 Commits

Author SHA1 Message Date
255a7afe73 core: Avoid queueing resizes while changing workspace during window drag
We already have a user move/resize going on, so avoid botching it with
window resizes with flags & META_MOVE_RESIZE_USER_ACTION == 0 that will
trigger unintended constraints.

https://gitlab.gnome.org/GNOME/mutter/issues/192

Closes: #192
2018-06-14 21:10:05 +02:00
3649795108 wayland: Detach MetaWaylandActorSurface from its actor on dispose
And ensure the actor is no longer reactive even though it might live longer
because of close effects, GCs, and whatnot. This ensures the actor is not
eligible for pointer picking within the destruction of its surface.

Closes: #188
2018-06-14 14:05:10 +02:00
36b9551f92 Update Chinese (Taiwan) translation 2018-06-13 08:36:21 +00:00
6abe4703c7 core: Hide close dialog before destroying
The MetaCloseDialog implementation object may stay artifically alive
for a longer period. This was usually fine till gnome-shell commit
b03bcc85aad, as the check_alive() timeout will keep running even
though the window went unmanaged/destroyed, leading to crashes.

In order to fix this, forcibly hide the dialog if it is visible and
the window is being unmanaged, so the timeout is stopped in time.
2018-06-08 17:41:34 +02:00
69ca584168 wayland: Handle get_subsurface() with a role-less parent surface
The order of role creation is undetermined, so we can't account that
the parent surface will have a role (and an actor) at the time of
creating the wl_subsurface role for a child surface.

So we must do it both ways, add the subsurface as a child on
get_subsurface() if the parent already got a role, and lazily add
child subsurface actors to the current one if the parent surface got
it at a later point.

Related: #132
2018-06-08 17:31:25 +02:00
8ee14a7cb7 renderer/native: Also wrap flip closures for EGLStreams
When using the EGLStream backend, the MetaRendererNative passed a
GClosure to KMS when using EGLStreams, but KMS flip callback event
handler in meta-gpu-kms.c expected a closure wrapped in a closure
container, meaning it'd instead crash when using EGLStreams. Make the
flip handler get what it expects also when using EGLStreams by wrapping
the flip closure in the container before handing it over to EGL.

https://bugzilla.gnome.org/show_bug.cgi?id=790316
2018-06-07 22:14:05 +02:00
909dbafd67 settings: Remove confused comment
It got lost, lets help it find the way out.
2018-06-07 12:57:52 +00:00
d5203f170e Make screen cast and remote desktop non-experimental
It's time to make this feature more accessible by not requiring editing
an array in gsettings.
2018-06-07 12:57:51 +00:00
2a45b7de7c clutter-input-device-xi2: Check for null group_modes before unref 2018-06-07 12:54:56 +01:00
62c67be4c8 clutter-actor: Fix uninitialized matrix multiply
`modelview` is uninitialized and the `apply` function just multiplies it.
What we really want is to initialize `modelview` so replace `apply` with
`get`.

Who knows what bugs this may have caused...
2018-05-31 15:43:27 +08:00
0332b7394e renderer-native: Don't crash if the FB surface can't be locked 2018-05-29 22:13:03 +00:00
15f41c9f68 device-manager-evdev: Add main seat to seats by default
Treat the main seat as other seats, so we don't have to handle it differently
in specific places. This was already the case before when a real device
was plugged before the startup, but not applied when hotplugging a device.
2018-05-29 10:35:51 +00:00
2a38601b42 device-manager-evdev: Free the main seat on finalize 2018-05-29 10:35:51 +00:00
d7bdc1591f device-manager-evdev: Set and unset the stage for the main seat too
When no input devices are available on startup the device manager might be fast
enough to be constructed so that no default stage is set yet, and thus when
main seat virtual devices are created they won't have a proper stage set.
If then we plug a real device, the events that an input manager could generate
won't be associated to any stage and thus won't be processed.

We need then ensure that when we update the stage for the device manager we
(un)associate it also to the main seat devices.
2018-05-29 10:35:51 +00:00
bd36764b4d wayland: Don't reset input focus on text commit
Preedit text can be active even after text commit. Resetting the input
focus will lead to unintended commit of the preedit text.

https://gitlab.gnome.org/GNOME/mutter/issues/152

Closes: #152
2018-05-26 18:58:42 +09:00
473bf38753 frames: Allow for unknown mouse buttons
Commit 47131b1d ("frames: Handle touch events") introduced an assert to
make sure that all mouse button actions are handled in mutter.

However, mice can have a more than 5 buttons, so simply ignore the
"other" actions instead of aborting.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/160
2018-05-25 09:20:36 +00:00
17 changed files with 114 additions and 114 deletions

View File

@ -2821,7 +2821,7 @@ _clutter_actor_fully_transform_vertices (ClutterActor *self,
/* Note: we pass NULL as the ancestor because we don't just want the modelview
* that gets us to stage coordinates, we want to go all the way to eye
* coordinates */
_clutter_actor_apply_relative_transformation_matrix (self, NULL, &modelview);
_clutter_actor_get_relative_transformation_matrix (self, NULL, &modelview);
/* Fetch the projection and viewport */
_clutter_stage_get_projection_matrix (CLUTTER_STAGE (stage), &projection);

View File

@ -793,10 +793,12 @@ evdev_add_device (ClutterDeviceManagerEvdev *manager_evdev,
if (priv->main_seat->libinput_seat == NULL)
seat = priv->main_seat;
else
seat = clutter_seat_evdev_new (manager_evdev);
{
seat = clutter_seat_evdev_new (manager_evdev);
priv->seats = g_slist_append (priv->seats, seat);
}
clutter_seat_evdev_set_libinput_seat (seat, libinput_seat);
priv->seats = g_slist_append (priv->seats, seat);
}
device = _clutter_input_device_evdev_new (manager, seat, libinput_device);
@ -932,7 +934,7 @@ clutter_device_manager_evdev_get_device (ClutterDeviceManager *manager,
return device;
}
return clutter_seat_evdev_get_device (priv->main_seat, id);
return NULL;
}
static void
@ -1962,6 +1964,7 @@ clutter_device_manager_evdev_constructed (GObject *gobject)
xkb_context_unref (ctx);
priv->main_seat = clutter_seat_evdev_new (manager_evdev);
priv->seats = g_slist_append (priv->seats, priv->main_seat);
dispatch_libinput (manager_evdev);

View File

@ -110,7 +110,8 @@ clutter_input_device_xi2_finalize (GObject *object)
if (device_xi2->wacom_device)
libwacom_destroy (device_xi2->wacom_device);
g_array_unref (device_xi2->group_modes);
if (device_xi2->group_modes)
g_array_unref (device_xi2->group_modes);
#endif
G_OBJECT_CLASS (clutter_input_device_xi2_parent_class)->finalize (object);

View File

@ -120,10 +120,6 @@
framebuffers instead of window content,
to manage HiDPI monitors. Does not
require a restart.
• “remote-desktop” — enables remote desktop support. To support
remote desktop with screen sharing,
“screen-cast” must also be enabled.
• “screen-cast” — enables screen cast support.
</description>
</key>

View File

@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: metacity 3.3.4\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2018-03-01 18:57+0000\n"
"PO-Revision-Date: 2018-03-03 15:20+0800\n"
"POT-Creation-Date: 2018-06-07 13:00+0000\n"
"PO-Revision-Date: 2018-06-09 11:26+0800\n"
"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
"Language-Team: Chinese (Taiwan) <zh-l10n@lists.linux.org.tw>\n"
"Language: zh_TW\n"
@ -18,7 +18,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.0.6\n"
"X-Generator: Poedit 2.0.8\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -379,32 +379,27 @@ msgid ""
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart. • “remote-desktop” — "
"enables remote desktop support. To support remote desktop with screen "
"sharing, “screen-cast” must also be enabled. • “screen-cast” — enables "
"screen cast support."
"manage HiDPI monitors. Does not require a restart."
msgstr ""
"若要啟用實驗性功能,請將功能關鍵字加入列表中。置於該功能是否須要重新啟動混成"
"器則視給予的功能而定。任何實驗性功能不一定能用、或是可以調整設定。請不要預期"
"在此設定中加入的任何東西未來都能存在。目前可用的關鍵字有: • “scale-monitor-"
"framebuffer” — 讓 mutter 預設採用邏輯像素座標空間的配置邏輯螢幕,而縮放螢幕 "
"framebuffer 則取代視窗內容以管理 HiDPI 螢幕。不須要重新啟動。 • “remote-"
"desktop” — 啟用遠端桌面支援。若要支援遠端桌面的螢幕分享則必須也啟用“screen-"
"cast”。• “screen-cast” — 啟用螢幕投放支援。"
"framebuffer 則取代視窗內容以管理 HiDPI 螢幕。不須要重新啟動。"
#: data/org.gnome.mutter.gschema.xml.in:145
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "從分頁彈出項選擇視窗"
#: data/org.gnome.mutter.gschema.xml.in:150
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "取消分頁彈出項"
#: data/org.gnome.mutter.gschema.xml.in:155
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "切換螢幕組態"
#: data/org.gnome.mutter.gschema.xml.in:160
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "旋轉切換內建螢幕組態"
@ -520,22 +515,22 @@ msgstr "切換螢幕"
msgid "Show on-screen help"
msgstr "顯示螢幕求助"
#: src/backends/meta-monitor-manager.c:900
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "內建顯示"
#: src/backends/meta-monitor-manager.c:923
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "不明"
#: src/backends/meta-monitor-manager.c:925
#: src/backends/meta-monitor-manager.c:928
msgid "Unknown Display"
msgstr "不明的顯示器"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:933
#: src/backends/meta-monitor-manager.c:936
#, c-format
msgid "%s %s"
msgstr "%s %s"

View File

@ -418,28 +418,6 @@ meta_backend_create_input_settings (MetaBackend *backend)
return META_BACKEND_GET_CLASS (backend)->create_input_settings (backend);
}
#ifdef HAVE_REMOTE_DESKTOP
static gboolean
is_screen_cast_enabled (MetaBackend *backend)
{
MetaSettings *settings = meta_backend_get_settings (backend);
return meta_settings_is_experimental_feature_enabled (
settings,
META_EXPERIMENTAL_FEATURE_SCREEN_CAST);
}
static gboolean
is_remote_desktop_enabled (MetaBackend *backend)
{
MetaSettings *settings = meta_backend_get_settings (backend);
return meta_settings_is_experimental_feature_enabled (
settings,
META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP);
}
#endif /* HAVE_REMOTE_DESKTOP */
static void
meta_backend_real_post_init (MetaBackend *backend)
{
@ -473,10 +451,8 @@ meta_backend_real_post_init (MetaBackend *backend)
#ifdef HAVE_REMOTE_DESKTOP
priv->dbus_session_watcher = g_object_new (META_TYPE_DBUS_SESSION_WATCHER, NULL);
if (is_screen_cast_enabled (backend))
priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
if (is_remote_desktop_enabled (backend))
priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
#endif /* HAVE_REMOTE_DESKTOP */
if (!meta_monitor_manager_is_headless (priv->monitor_manager))
@ -568,26 +544,6 @@ meta_backend_class_init (MetaBackendClass *klass)
stage_views_disabled = g_strcmp0 (mutter_stage_views, "0") == 0;
}
static void
experimental_features_changed (MetaSettings *settings,
MetaExperimentalFeature old_experimental_features,
MetaBackend *backend)
{
#ifdef HAVE_REMOTE_DESKTOP
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
if (is_screen_cast_enabled (backend) && !priv->screen_cast)
priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
else if (!is_screen_cast_enabled (backend))
g_clear_object (&priv->screen_cast);
if (is_remote_desktop_enabled (backend) && !priv->remote_desktop)
priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
else if (!is_remote_desktop_enabled (backend))
g_clear_object (&priv->remote_desktop);
#endif /* HAVE_REMOTE_DESKTOP */
}
static MetaMonitorManager *
meta_backend_create_monitor_manager (MetaBackend *backend,
GError **error)
@ -670,9 +626,6 @@ meta_backend_initable_init (GInitable *initable,
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
priv->settings = meta_settings_new (backend);
g_signal_connect (priv->settings, "experimental-features-changed",
G_CALLBACK (experimental_features_changed),
backend);
priv->egl = g_object_new (META_TYPE_EGL, NULL);

View File

@ -31,9 +31,7 @@ typedef enum _MetaExperimentalFeature
{
META_EXPERIMENTAL_FEATURE_NONE = 0,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
META_EXPERIMENTAL_FEATURE_SCREEN_CAST = (1 << 1),
META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP = (1 << 2),
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 3),
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1),
} MetaExperimentalFeature;
#define META_TYPE_SETTINGS (meta_settings_get_type ())

View File

@ -260,13 +260,8 @@ experimental_features_handler (GVariant *features_variant,
g_variant_iter_init (&features_iter, features_variant);
while (g_variant_iter_loop (&features_iter, "s", &feature))
{
/* So far no experimental features defined. */
if (g_str_equal (feature, "scale-monitor-framebuffer"))
features |= META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
else if (g_str_equal (feature, "screen-cast"))
features |= META_EXPERIMENTAL_FEATURE_SCREEN_CAST;
else if (g_str_equal (feature, "remote-desktop"))
features |= META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP;
else if (g_str_equal (feature, "kms-modifiers"))
features |= META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
else

View File

@ -47,6 +47,12 @@ typedef struct _MetaKmsSource
MetaGpuKms *gpu_kms;
} MetaKmsSource;
typedef struct _MetaGpuKmsFlipClosureContainer
{
GClosure *flip_closure;
MetaGpuKms *gpu_kms;
} MetaGpuKmsFlipClosureContainer;
struct _MetaGpuKms
{
MetaGpu parent;
@ -199,11 +205,26 @@ meta_gpu_kms_is_crtc_active (MetaGpuKms *gpu_kms,
return TRUE;
}
typedef struct _GpuClosureContainer
MetaGpuKmsFlipClosureContainer *
meta_gpu_kms_wrap_flip_closure (MetaGpuKms *gpu_kms,
GClosure *flip_closure)
{
GClosure *flip_closure;
MetaGpuKms *gpu_kms;
} GpuClosureContainer;
MetaGpuKmsFlipClosureContainer *closure_container;
closure_container = g_new0 (MetaGpuKmsFlipClosureContainer, 1);
*closure_container = (MetaGpuKmsFlipClosureContainer) {
.flip_closure = flip_closure,
.gpu_kms = gpu_kms
};
return closure_container;
}
void
meta_gpu_kms_flip_closure_container_free (MetaGpuKmsFlipClosureContainer *closure_container)
{
g_free (closure_container);
}
gboolean
meta_gpu_kms_flip_crtc (MetaGpuKms *gpu_kms,
@ -229,14 +250,11 @@ meta_gpu_kms_flip_crtc (MetaGpuKms *gpu_kms,
if (!gpu_kms->page_flips_not_supported)
{
GpuClosureContainer *closure_container;
MetaGpuKmsFlipClosureContainer *closure_container;
int kms_fd = meta_gpu_kms_get_fd (gpu_kms);
closure_container = g_new0 (GpuClosureContainer, 1);
*closure_container = (GpuClosureContainer) {
.flip_closure = flip_closure,
.gpu_kms = gpu_kms
};
closure_container = meta_gpu_kms_wrap_flip_closure (gpu_kms,
flip_closure);
ret = drmModePageFlip (kms_fd,
crtc->crtc_id,
@ -245,7 +263,7 @@ meta_gpu_kms_flip_crtc (MetaGpuKms *gpu_kms,
closure_container);
if (ret != 0 && ret != -EACCES)
{
g_free (closure_container);
meta_gpu_kms_flip_closure_container_free (closure_container);
g_warning ("Failed to flip: %s", strerror (-ret));
gpu_kms->page_flips_not_supported = TRUE;
}
@ -276,12 +294,12 @@ page_flip_handler (int fd,
unsigned int usec,
void *user_data)
{
GpuClosureContainer *closure_container = user_data;
MetaGpuKmsFlipClosureContainer *closure_container = user_data;
GClosure *flip_closure = closure_container->flip_closure;
MetaGpuKms *gpu_kms = closure_container->gpu_kms;
invoke_flip_closure (flip_closure, gpu_kms);
g_free (closure_container);
meta_gpu_kms_flip_closure_container_free (closure_container);
}
gboolean

View File

@ -32,6 +32,8 @@
#define META_TYPE_GPU_KMS (meta_gpu_kms_get_type ())
G_DECLARE_FINAL_TYPE (MetaGpuKms, meta_gpu_kms, META, GPU_KMS, MetaGpu)
typedef struct _MetaGpuKmsFlipClosureContainer MetaGpuKmsFlipClosureContainer;
typedef struct _MetaKmsResources
{
drmModeRes *resources;
@ -84,4 +86,9 @@ gboolean meta_drm_mode_equal (const drmModeModeInfo *one,
float meta_calculate_drm_mode_refresh_rate (const drmModeModeInfo *mode);
MetaGpuKmsFlipClosureContainer * meta_gpu_kms_wrap_flip_closure (MetaGpuKms *gpu_kms,
GClosure *flip_closure);
void meta_gpu_kms_flip_closure_container_free (MetaGpuKmsFlipClosureContainer *closure_container);
#endif /* META_GPU_KMS_H */

View File

@ -1271,6 +1271,7 @@ flip_egl_stream (MetaOnscreenNative *onscreen_native,
MetaRendererNativeGpuData *renderer_gpu_data;
EGLDisplay *egl_display;
MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native);
MetaGpuKmsFlipClosureContainer *closure_container;
EGLAttrib *acquire_attribs;
GError *error = NULL;
@ -1280,9 +1281,12 @@ flip_egl_stream (MetaOnscreenNative *onscreen_native,
if (renderer_gpu_data->egl.no_egl_output_drm_flip_event)
return FALSE;
closure_container =
meta_gpu_kms_wrap_flip_closure (onscreen_native->render_gpu, flip_closure);
acquire_attribs = (EGLAttrib[]) {
EGL_DRM_FLIP_EVENT_DATA_NV,
(EGLAttrib) flip_closure,
(EGLAttrib) closure_container,
EGL_NONE
};
@ -1301,6 +1305,7 @@ flip_egl_stream (MetaOnscreenNative *onscreen_native,
renderer_gpu_data->egl.no_egl_output_drm_flip_event = TRUE;
}
g_error_free (error);
meta_gpu_kms_flip_closure_container_free (closure_container);
return FALSE;
}
@ -1601,6 +1606,12 @@ gbm_get_next_fb_id (MetaGpuKms *gpu_kms,
/* Now we need to set the CRTC to whatever is the front buffer */
next_bo = gbm_surface_lock_front_buffer (gbm_surface);
if (!next_bo)
{
g_error ("Impossible to lock surface front buffer: %m");
return FALSE;
}
for (i = 0; i < gbm_bo_get_plane_count (next_bo); i++)
{
strides[i] = gbm_bo_get_stride_for_plane (next_bo, i);

View File

@ -115,5 +115,8 @@ meta_window_kill (MetaWindow *window)
void
meta_window_free_delete_dialog (MetaWindow *window)
{
if (window->close_dialog &&
meta_close_dialog_is_visible (window->close_dialog))
meta_close_dialog_hide (window->close_dialog);
g_clear_object (&window->close_dialog);
}

View File

@ -4734,7 +4734,7 @@ set_workspace_state (MetaWindow *window,
/* queue a move_resize since changing workspaces may change
* the relevant struts
*/
if (!window->override_redirect)
if (!window->override_redirect && window != window->display->grab_window)
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
meta_window_current_workspace_changed (window);

View File

@ -75,7 +75,8 @@ enum {
META_ACTION_CLICK,
META_ACTION_RIGHT_CLICK,
META_ACTION_MIDDLE_CLICK,
META_ACTION_DOUBLE_CLICK
META_ACTION_DOUBLE_CLICK,
META_ACTION_IGNORE
};
static GObject *
@ -974,6 +975,10 @@ get_action (const ClutterEvent *event)
return META_ACTION_RIGHT_CLICK;
case CLUTTER_BUTTON_MIDDLE:
return META_ACTION_MIDDLE_CLICK;
default:
meta_verbose ("No action triggered for button %u %s\n",
event->button.button,
(event->type == CLUTTER_BUTTON_PRESS) ? "press" : "release");
}
}
else if (event->type == CLUTTER_TOUCH_BEGIN ||
@ -983,7 +988,7 @@ get_action (const ClutterEvent *event)
return META_ACTION_CLICK;
}
g_assert_not_reached ();
return META_ACTION_IGNORE;
}
static uint32_t
@ -1115,13 +1120,15 @@ handle_press_event (MetaUIFrame *frame,
g_assert (event->type == CLUTTER_BUTTON_PRESS ||
event->type == CLUTTER_TOUCH_BEGIN);
action = get_action (event);
if (action == META_ACTION_IGNORE)
return FALSE;
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
evtime = clutter_event_get_time (event);
clutter_event_get_coords (event, &x, &y);
control = get_control (frame, x, y);
action = get_action (event);
/* don't do the rest of this if on client area */
if (control == META_FRAME_CONTROL_CLIENT_AREA)
return FALSE; /* not on the frame, just passed through from client */

View File

@ -50,19 +50,23 @@ meta_wayland_actor_surface_constructed (GObject *object)
}
static void
meta_wayland_actor_surface_finalize (GObject *object)
meta_wayland_actor_surface_dispose (GObject *object)
{
MetaWaylandActorSurfacePrivate *priv =
meta_wayland_actor_surface_get_instance_private (META_WAYLAND_ACTOR_SURFACE (object));
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (META_WAYLAND_SURFACE_ROLE (object));
g_signal_handlers_disconnect_by_func (priv->actor,
meta_wayland_surface_notify_geometry_changed,
surface);
g_object_unref (priv->actor);
if (priv->actor)
{
g_signal_handlers_disconnect_by_func (priv->actor,
meta_wayland_surface_notify_geometry_changed,
surface);
clutter_actor_set_reactive (CLUTTER_ACTOR (priv->actor), FALSE);
g_clear_object (&priv->actor);
}
G_OBJECT_CLASS (meta_wayland_actor_surface_parent_class)->finalize (object);
G_OBJECT_CLASS (meta_wayland_actor_surface_parent_class)->dispose (object);
}
static void
@ -72,10 +76,18 @@ meta_wayland_actor_surface_assigned (MetaWaylandSurfaceRole *surface_role)
meta_wayland_actor_surface_get_instance_private (META_WAYLAND_ACTOR_SURFACE (surface_role));
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
GList *l;
meta_surface_actor_wayland_add_frame_callbacks (META_SURFACE_ACTOR_WAYLAND (priv->actor),
&surface->pending_frame_callback_list);
wl_list_init (&surface->pending_frame_callback_list);
for (l = surface->subsurfaces; l; l = l->next)
{
ClutterActor *subsurface_actor =
CLUTTER_ACTOR (meta_wayland_surface_get_actor (l->data));
clutter_actor_add_child (CLUTTER_ACTOR (priv->actor), subsurface_actor);
}
}
static void
@ -262,7 +274,7 @@ meta_wayland_actor_surface_class_init (MetaWaylandActorSurfaceClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructed = meta_wayland_actor_surface_constructed;
object_class->finalize = meta_wayland_actor_surface_finalize;
object_class->dispose = meta_wayland_actor_surface_dispose;
surface_role_class->assigned = meta_wayland_actor_surface_assigned;
surface_role_class->commit = meta_wayland_actor_surface_commit;

View File

@ -471,8 +471,11 @@ wl_subcompositor_get_subsurface (struct wl_client *client,
&surface->sub.parent_destroy_listener);
parent->subsurfaces = g_list_append (parent->subsurfaces, surface);
clutter_actor_add_child (CLUTTER_ACTOR (meta_wayland_surface_get_actor (parent)),
CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)));
if (meta_wayland_surface_get_actor (parent))
{
clutter_actor_add_child (CLUTTER_ACTOR (meta_wayland_surface_get_actor (parent)),
CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)));
}
clutter_actor_set_reactive (CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)), TRUE);
}

View File

@ -120,8 +120,6 @@ meta_wayland_text_input_focus_commit_text (ClutterInputFocus *focus,
gtk_text_input_send_preedit_string (resource, NULL, 0);
gtk_text_input_send_commit_string (resource, text);
}
clutter_input_focus_reset (focus);
}
static void