window: Move surface property to it subclasses

As we have specific window types per display server,
having it in the parent class makes building without wayland
harder to achieve

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2418>
This commit is contained in:
Bilal Elmoussaoui
2022-05-18 13:51:44 +02:00
committed by Marge Bot
parent c3a01e4e18
commit 6b77532a23
13 changed files with 193 additions and 45 deletions

View File

@ -1437,8 +1437,11 @@ meta_display_sync_wayland_input_focus (MetaDisplay *display)
focus_window = NULL;
else if (clutter_stage_get_grab_actor (CLUTTER_STAGE (stage)))
focus_window = NULL;
else if (display->focus_window && display->focus_window->surface)
#ifdef HAVE_WAYLAND
else if (display->focus_window &&
meta_window_get_wayland_surface (display->focus_window))
focus_window = display->focus_window;
#endif
else
meta_topic (META_DEBUG_FOCUS, "Focus change has no effect, because there is no matching wayland surface");