Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package mutter for openSUSE:Factory checked 
in at 2023-03-15 18:53:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mutter (Old)
 and      /work/SRC/openSUSE:Factory/.mutter.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mutter"

Wed Mar 15 18:53:05 2023 rev:196 rq:1071263 version:43.3+2

Changes:
--------
--- /work/SRC/openSUSE:Factory/mutter/mutter.changes    2023-02-21 
15:36:02.396286274 +0100
+++ /work/SRC/openSUSE:Factory/.mutter.new.31432/mutter.changes 2023-03-15 
18:53:11.875965379 +0100
@@ -1,0 +2,7 @@
+Mon Mar 13 08:25:25 UTC 2023 - Alynx Zhou <alynx.z...@suse.com>
+
+- Add mutter-prevent-newly-focused-windows-to-steal-focus-from-shell.patch:
+  Revert wrong commit and try a third approach to fix focus
+  (bsc#1208494).
+
+-------------------------------------------------------------------

New:
----
  mutter-prevent-newly-focused-windows-to-steal-focus-from-shell.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mutter.spec ++++++
--- /var/tmp/diff_new_pack.giVvCz/_old  2023-03-15 18:53:12.571969082 +0100
+++ /var/tmp/diff_new_pack.giVvCz/_new  2023-03-15 18:53:12.575969103 +0100
@@ -40,6 +40,8 @@
 Patch2:         mutter-window-actor-Special-case-shaped-Java-windows.patch
 # PATCH-FIX-UPSTREAM mutter-crash-meta_context_terminate.patch bsc#1199382 
glgo#GNOME/mutter#2267 xw...@suse.com -- Fix SIGSEGV in meta_context_terminate
 Patch3:         mutter-crash-meta_context_terminate.patch
+# PATCH-FIX-UPSTREAM 
mutter-prevent-newly-focused-windows-to-steal-focus-from-shell.patch 
bsc#1208494, glgo#GNOME/mutter!2878 alynx.z...@suse.com -- Fix broken window 
focus
+Patch4:         
mutter-prevent-newly-focused-windows-to-steal-focus-from-shell.patch
 
 ## SLE-only patches start at 1000
 # PATCH-FEATURE-SLE mutter-SLE-bell.patch FATE#316042 bnc#889218 
idon...@suse.com -- make audible bell work out of the box.
@@ -148,6 +150,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 # SLE-only patches and translations.
 %if 0%{?sle_version}

++++++ mutter-prevent-newly-focused-windows-to-steal-focus-from-shell.patch 
++++++
diff --unified --recursive --text --new-file --color 
mutter-43.3+4.old/src/core/events.c mutter-43.3+4.new/src/core/events.c
--- mutter-43.3+4.old/src/core/events.c 2023-03-13 16:20:18.953566837 +0800
+++ mutter-43.3+4.new/src/core/events.c 2023-03-13 16:21:25.375564893 +0800
@@ -34,7 +34,6 @@
 #include "core/display-private.h"
 #include "core/window-private.h"
 #include "meta/meta-backend.h"
-#include "x11/meta-x11-display-private.h"
 
 #ifdef HAVE_NATIVE_BACKEND
 #include "backends/native/meta-backend-native.h"
@@ -261,9 +260,6 @@
           display->grabbed_in_clutter = FALSE;
           meta_compositor_grab_end (compositor);
         }
-
-      if (display->x11_display)
-        meta_x11_display_sync_input_focus (display->x11_display);
     }
 
   device = clutter_event_get_device (event);
diff --unified --recursive --text --new-file --color 
mutter-43.3+4.old/src/core/window.c mutter-43.3+4.new/src/core/window.c
--- mutter-43.3+4.old/src/core/window.c 2023-03-13 16:20:18.956900099 +0800
+++ mutter-43.3+4.new/src/core/window.c 2023-03-13 16:21:25.382231433 +0800
@@ -1988,6 +1988,15 @@
       return;
     }
 
+  /* Do not focus window on map if input is already taken by the
+   * compositor.
+   */
+  if (!meta_display_windows_are_interactable (window->display))
+    {
+      *takes_focus = FALSE;
+      return;
+    }
+
   /* Terminal usage may be different; some users intend to launch
    * many apps in quick succession or to just view things in the new
    * window while still interacting with the terminal.  In that case,
diff --unified --recursive --text --new-file --color 
mutter-43.3+4.old/src/x11/events.c mutter-43.3+4.new/src/x11/events.c
--- mutter-43.3+4.old/src/x11/events.c  2023-03-13 16:20:18.990232717 +0800
+++ mutter-43.3+4.new/src/x11/events.c  2023-03-13 16:21:25.382231433 +0800
@@ -1009,9 +1009,6 @@
       break;
     case XI_FocusIn:
     case XI_FocusOut:
-      if (clutter_stage_get_grab_actor (stage) != NULL)
-        break;
-
       if (handle_window_focus_event (x11_display, window, enter_event, serial) 
&&
           enter_event->event == enter_event->root)
         {
@@ -1933,8 +1930,7 @@
       event->xany.serial > x11_display->focus_serial &&
       display->focus_window &&
       display->focus_window->client_type == META_WINDOW_CLIENT_TYPE_X11 &&
-      !window_has_xwindow (display->focus_window, 
x11_display->server_focus_window) &&
-      meta_display_windows_are_interactable (display))
+      !window_has_xwindow (display->focus_window, 
x11_display->server_focus_window))
     {
       meta_topic (META_DEBUG_FOCUS, "Earlier attempt to focus %s failed",
                   display->focus_window->desc);
diff --unified --recursive --text --new-file --color 
mutter-43.3+4.old/src/x11/meta-x11-display.c 
mutter-43.3+4.new/src/x11/meta-x11-display.c
--- mutter-43.3+4.old/src/x11/meta-x11-display.c        2023-03-13 
16:20:18.990232717 +0800
+++ mutter-43.3+4.new/src/x11/meta-x11-display.c        2023-03-13 
16:21:25.375564893 +0800
@@ -1944,10 +1944,6 @@
                                            Window          xwindow,
                                            uint32_t        timestamp)
 {
-  if (xwindow != None &&
-      !meta_display_windows_are_interactable (x11_display->display))
-    return;
-
   meta_x11_error_trap_push (x11_display);
 
   /* In order for mutter to know that the focus request succeeded, we track
@@ -2020,22 +2016,6 @@
   x11_display->display->last_focus_time = timestamp;
 }
 
-void
-meta_x11_display_sync_input_focus (MetaX11Display *x11_display)
-{
-  guint timestamp;
-
-  if (!meta_display_windows_are_interactable (x11_display->display))
-    return;
-
-  meta_x11_error_trap_push (x11_display);
-  timestamp = meta_display_get_current_time (x11_display->display);
-  meta_x11_display_set_input_focus_internal (x11_display,
-                                             x11_display->focus_xwindow,
-                                             timestamp);
-  meta_x11_error_trap_pop (x11_display);
-}
-
 static MetaX11DisplayLogicalMonitorData *
 get_x11_display_logical_monitor_data (MetaLogicalMonitor *logical_monitor)
 {
diff --unified --recursive --text --new-file --color 
mutter-43.3+4.old/src/x11/meta-x11-display-private.h 
mutter-43.3+4.new/src/x11/meta-x11-display-private.h
--- mutter-43.3+4.old/src/x11/meta-x11-display-private.h        2023-03-13 
16:20:18.990232717 +0800
+++ mutter-43.3+4.new/src/x11/meta-x11-display-private.h        2023-03-13 
16:21:25.375564893 +0800
@@ -258,8 +258,6 @@
                                        gboolean        focus_frame,
                                        uint32_t        timestamp);
 
-void meta_x11_display_sync_input_focus (MetaX11Display *x11_display);
-
 MetaDisplay * meta_x11_display_get_display (MetaX11Display *x11_display);
 
 #endif /* META_X11_DISPLAY_PRIVATE_H */
diff --unified --recursive --text --new-file --color 
mutter-43.3+4.old/src/x11/window-x11.c mutter-43.3+4.new/src/x11/window-x11.c
--- mutter-43.3+4.old/src/x11/window-x11.c      2023-03-13 16:20:18.993565979 
+0800
+++ mutter-43.3+4.new/src/x11/window-x11.c      2023-03-13 16:21:25.382231433 
+0800
@@ -3382,7 +3382,8 @@
                                       event->xclient.data.l[4]); /* height */
     }
   else if (event->xclient.message_type ==
-           x11_display->atom__NET_ACTIVE_WINDOW)
+           x11_display->atom__NET_ACTIVE_WINDOW &&
+           meta_display_windows_are_interactable (window->display))
     {
       MetaClientType source_indication;
       guint32        timestamp;

Reply via email to