Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package fcitx5-gtk for openSUSE:Factory 
checked in at 2023-05-23 14:53:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fcitx5-gtk (Old)
 and      /work/SRC/openSUSE:Factory/.fcitx5-gtk.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fcitx5-gtk"

Tue May 23 14:53:56 2023 rev:10 rq:1088357 version:5.0.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/fcitx5-gtk/fcitx5-gtk.changes    2023-03-19 
00:31:22.316317130 +0100
+++ /work/SRC/openSUSE:Factory/.fcitx5-gtk.new.1533/fcitx5-gtk.changes  
2023-05-23 14:54:19.686406703 +0200
@@ -1,0 +2,6 @@
+Mon May 22 10:43:37 UTC 2023 - Marguerite Su <i...@marguerite.su>
+
+- Update to 5.0.23
+  * hotfix to fix a potential crash under wayland
+
+-------------------------------------------------------------------

Old:
----
  fcitx5-gtk-5.0.22.tar.xz

New:
----
  fcitx5-gtk-5.0.23.tar.xz

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

Other differences:
------------------
++++++ fcitx5-gtk.spec ++++++
--- /var/tmp/diff_new_pack.HgDjux/_old  2023-05-23 14:54:20.258410088 +0200
+++ /var/tmp/diff_new_pack.HgDjux/_new  2023-05-23 14:54:20.266410135 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           fcitx5-gtk
-Version:        5.0.22
+Version:        5.0.23
 Release:        0
 Summary:        Gtk im module for fcitx5 and glib based dbus client library
 License:        LGPL-2.1-or-later
@@ -59,9 +59,9 @@
 %package -n fcitx5-gtk2
 Summary:        GTK+ 2.0 im module for fcitx5
 Group:          System/I18n/Chinese
+Supplements:    (fcitx5 and libgtk-2_0-0)
 Provides:       fcitx-gtk2 = %{version}
 Obsoletes:      fcitx-gtk2 <= 4.2.9.8
-Supplements:    (fcitx5 and libgtk-2_0-0)
 %{gtk2_immodule_requires}
 
 %description -n fcitx5-gtk2
@@ -70,9 +70,9 @@
 %package -n fcitx5-gtk3
 Summary:        GTK+ 3.0 im module for fcitx5
 Group:          System/I18n/Chinese
+Supplements:    (fcitx5 and libgtk-3-0)
 Provides:       fcitx-gtk3 = %{version}
 Obsoletes:      fcitx-gtk3 <= 4.2.9.8
-Supplements:    (fcitx5 and libgtk-3-0)
 %{gtk3_immodule_requires}
 
 %description -n fcitx5-gtk3

++++++ fcitx5-gtk-5.0.22.tar.xz -> fcitx5-gtk-5.0.23.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-gtk-5.0.22/CMakeLists.txt 
new/fcitx5-gtk-5.0.23/CMakeLists.txt
--- old/fcitx5-gtk-5.0.22/CMakeLists.txt        2023-03-11 05:01:57.579068200 
+0100
+++ new/fcitx5-gtk-5.0.23/CMakeLists.txt        2023-03-17 04:40:02.752954200 
+0100
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.6)
-project(fcitx5-gtk VERSION 5.0.22)
+project(fcitx5-gtk VERSION 5.0.23)
 
 find_package(ECM REQUIRED 1.0.0)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" 
${CMAKE_MODULE_PATH})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-gtk-5.0.22/gtk2/fcitximcontext.cpp 
new/fcitx5-gtk-5.0.23/gtk2/fcitximcontext.cpp
--- old/fcitx5-gtk-5.0.22/gtk2/fcitximcontext.cpp       2023-02-02 
21:40:20.115213900 +0100
+++ new/fcitx5-gtk-5.0.23/gtk2/fcitximcontext.cpp       2023-03-17 
04:35:58.658763400 +0100
@@ -39,6 +39,7 @@
 
     GdkWindow *client_window;
     gulong button_press_signal;
+    bool has_rect;
     GdkRectangle area;
     FcitxGClient *client;
     GtkIMContext *slave;
@@ -299,6 +300,7 @@
 
 static void fcitx_im_context_init(FcitxIMContext *context, gpointer) {
     context->client = NULL;
+    context->has_rect = FALSE;
     context->area.x = -1;
     context->area.y = -1;
     context->area.width = 0;
@@ -838,11 +840,13 @@
                                                  GdkRectangle *area) {
     FcitxIMContext *fcitxcontext = FCITX_IM_CONTEXT(context);
 
-    if (fcitxcontext->area.x == area->x && fcitxcontext->area.y == area->y &&
-        fcitxcontext->area.width == area->width &&
-        fcitxcontext->area.height == area->height) {
+    if (fcitxcontext->has_rect &&
+        (fcitxcontext->area.x == area->x && fcitxcontext->area.y == area->y &&
+         fcitxcontext->area.width == area->width &&
+         fcitxcontext->area.height == area->height)) {
         return;
     }
+    fcitxcontext->has_rect = TRUE;
     fcitxcontext->area = *area;
 
     if (fcitx_g_client_is_valid(fcitxcontext->client)) {
@@ -863,8 +867,7 @@
 
     area = fcitxcontext->area;
     {
-        if (area.x == -1 && area.y == -1 && area.width == 0 &&
-            area.height == 0) {
+        if (!fcitxcontext->has_rect) {
             gint w, h;
             gdk_drawable_get_size(fcitxcontext->client_window, &w, &h);
             area.y += h;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-gtk-5.0.22/gtk3/fcitximcontext.cpp 
new/fcitx5-gtk-5.0.23/gtk3/fcitximcontext.cpp
--- old/fcitx5-gtk-5.0.22/gtk3/fcitximcontext.cpp       2023-02-02 
21:40:40.028492000 +0100
+++ new/fcitx5-gtk-5.0.23/gtk3/fcitximcontext.cpp       2023-03-17 
04:35:58.658763400 +0100
@@ -45,6 +45,7 @@
 
     GdkWindow *client_window;
     gulong button_press_signal;
+    bool has_rect;
     GdkRectangle area;
     FcitxGClient *client;
     GtkIMContext *slave;
@@ -319,6 +320,7 @@
 
 static void fcitx_im_context_init(FcitxIMContext *context, gpointer) {
     context->client = NULL;
+    context->has_rect = FALSE;
     context->area.x = -1;
     context->area.y = -1;
     context->area.width = 0;
@@ -825,6 +827,10 @@
 
     _fcitx_im_context_set_capability(fcitxcontext, FALSE);
 
+    if (fcitxcontext->candidate_window && fcitxcontext->has_rect) {
+        fcitxcontext->candidate_window->setCursorRect(fcitxcontext->area);
+    }
+
     fcitxcontext->has_focus = true;
 
 /*
@@ -919,11 +925,13 @@
                                                  GdkRectangle *area) {
     FcitxIMContext *fcitxcontext = FCITX_IM_CONTEXT(context);
 
-    if (fcitxcontext->area.x == area->x && fcitxcontext->area.y == area->y &&
-        fcitxcontext->area.width == area->width &&
-        fcitxcontext->area.height == area->height) {
+    if (fcitxcontext->has_rect &&
+        (fcitxcontext->area.x == area->x && fcitxcontext->area.y == area->y &&
+         fcitxcontext->area.width == area->width &&
+         fcitxcontext->area.height == area->height)) {
         return;
     }
+    fcitxcontext->has_rect = TRUE;
     fcitxcontext->area = *area;
     if (fcitxcontext->candidate_window) {
         fcitxcontext->candidate_window->setCursorRect(fcitxcontext->area);
@@ -962,8 +970,7 @@
     } else
 #endif
     {
-        if (area.x == -1 && area.y == -1 && area.width == 0 &&
-            area.height == 0) {
+        if (!fcitxcontext->has_rect) {
             area.x = 0;
             area.y += gdk_window_get_height(fcitxcontext->client_window);
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-gtk-5.0.22/gtk3/gtk3inputwindow.cpp 
new/fcitx5-gtk-5.0.23/gtk3/gtk3inputwindow.cpp
--- old/fcitx5-gtk-5.0.22/gtk3/gtk3inputwindow.cpp      2022-11-12 
18:12:58.154401800 +0100
+++ new/fcitx5-gtk-5.0.23/gtk3/gtk3inputwindow.cpp      2023-03-17 
04:35:58.662096700 +0100
@@ -12,7 +12,9 @@
 
 Gtk3InputWindow::Gtk3InputWindow(ClassicUIConfig *config, FcitxGClient *client,
                                  bool isWayland)
-    : InputWindow(config, client), isWayland_(isWayland) {}
+    : InputWindow(config, client), isWayland_(isWayland) {
+    rect_.x = rect_.y = rect_.height = rect_.width = 0;
+}
 
 Gtk3InputWindow::~Gtk3InputWindow() {
     if (window_) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-gtk-5.0.22/gtk4/fcitximcontext.cpp 
new/fcitx5-gtk-5.0.23/gtk4/fcitximcontext.cpp
--- old/fcitx5-gtk-5.0.22/gtk4/fcitximcontext.cpp       2023-02-02 
21:40:52.698458700 +0100
+++ new/fcitx5-gtk-5.0.23/gtk4/fcitximcontext.cpp       2023-03-17 
04:35:58.662096700 +0100
@@ -254,6 +254,7 @@
 
 static void fcitx_im_context_init(FcitxIMContext *context, gpointer) {
     context->client = NULL;
+    context->has_rect = FALSE;
     context->area.x = -1;
     context->area.y = -1;
     context->area.width = 0;
@@ -744,6 +745,9 @@
 
     gtk_im_context_focus_in(fcitxcontext->slave);
 
+    if (fcitxcontext->candidate_window && fcitxcontext->has_rect) {
+        fcitxcontext->candidate_window->setCursorRect(fcitxcontext->area);
+    }
     /* set_cursor_location_internal() will get origin from X server,
      * it blocks UI. So delay it to idle callback. */
     g_idle_add_full(G_PRIORITY_DEFAULT_IDLE,
@@ -820,11 +824,13 @@
                                                  GdkRectangle *area) {
     FcitxIMContext *fcitxcontext = FCITX_IM_CONTEXT(context);
 
-    if (fcitxcontext->area.x == area->x && fcitxcontext->area.y == area->y &&
-        fcitxcontext->area.width == area->width &&
-        fcitxcontext->area.height == area->height) {
+    if (fcitxcontext->has_rect &&
+        (fcitxcontext->area.x == area->x && fcitxcontext->area.y == area->y &&
+         fcitxcontext->area.width == area->width &&
+         fcitxcontext->area.height == area->height)) {
         return;
     }
+    fcitxcontext->has_rect = TRUE;
     fcitxcontext->area = *area;
     if (fcitxcontext->candidate_window) {
         fcitxcontext->candidate_window->setCursorRect(fcitxcontext->area);
@@ -885,9 +891,7 @@
         if (auto *native = gtk_widget_get_root(fcitxcontext->client_widget)) {
             if (auto *surface = gtk_native_get_surface(GTK_NATIVE(native));
                 surface && GDK_IS_X11_SURFACE(surface)) {
-                if (fcitxcontext->area.x == -1 && fcitxcontext->area.y == -1 &&
-                    fcitxcontext->area.width == 0 &&
-                    fcitxcontext->area.height == 0) {
+                if (!fcitxcontext->has_rect) {
                     area.x = 0;
                     area.y += gdk_surface_get_height(surface);
                 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-gtk-5.0.22/gtk4/fcitximcontextprivate.h 
new/fcitx5-gtk-5.0.23/gtk4/fcitximcontextprivate.h
--- old/fcitx5-gtk-5.0.22/gtk4/fcitximcontextprivate.h  2022-12-16 
19:53:05.867176300 +0100
+++ new/fcitx5-gtk-5.0.23/gtk4/fcitximcontextprivate.h  2023-03-17 
04:35:58.662096700 +0100
@@ -14,6 +14,7 @@
     GtkIMContext parent;
 
     GtkWidget *client_widget;
+    bool has_rect;
     GdkRectangle area;
     FcitxGClient *client;
     GtkIMContext *slave;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcitx5-gtk-5.0.22/gtk4/gtk4inputwindow.cpp 
new/fcitx5-gtk-5.0.23/gtk4/gtk4inputwindow.cpp
--- old/fcitx5-gtk-5.0.22/gtk4/gtk4inputwindow.cpp      2022-11-24 
06:56:50.266487000 +0100
+++ new/fcitx5-gtk-5.0.23/gtk4/gtk4inputwindow.cpp      2023-03-17 
04:35:58.662096700 +0100
@@ -12,6 +12,7 @@
 
 Gtk4InputWindow::Gtk4InputWindow(ClassicUIConfig *config, FcitxGClient *client)
     : InputWindow(config, client) {
+    rect_.x = rect_.y = rect_.height = rect_.width = 0;
     dummyWidget_.reset(GTK_WINDOW(gtk_window_new()));
 }
 

Reply via email to