[gimp] app, libgimp: fix more unused function warning (Win32).



commit f59b0db0c8c6b363718b5effcea1d87c16a16b35
Author: Jehan <jehan girinstud io>
Date:   Thu Oct 10 14:02:38 2019 +0200

    app, libgimp: fix more unused function warning (Win32).
    
    Similar to commit 9b328167ab. Apparently the same function is duplicated
    into app/.
    Also add some comments to detail a bit more where this Win32 different
    comes from (i.e. bug 359538 on Bugzilla, commit eac61e1e122).
    
    Moreover I tested the same steps as comment 4 in bug 359538 on master
    code. The same hanging issue still exists with GTK+ 3.24.1 (in a Windows
    VM at least). I have not investigated further, just wanted to check if
    this ifndef could not simply be removed by now. Apparently not.

 app/widgets/gimpwidgets-utils.c | 6 ++++++
 libgimp/gimpui.c                | 3 +++
 2 files changed, 9 insertions(+)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index 986276e6a4..b71f02ddab 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -899,6 +899,7 @@ gimp_window_get_native_id (GtkWindow *window)
   return 0;
 }
 
+#ifndef GDK_WINDOWING_WIN32
 static void
 gimp_window_transient_realized (GtkWidget *window,
                                 GdkWindow *parent)
@@ -923,6 +924,7 @@ gimp_get_foreign_window (guint32 window)
 
   return NULL;
 }
+#endif
 
 void
 gimp_window_set_transient_for (GtkWindow *window,
@@ -934,6 +936,10 @@ gimp_window_set_transient_for (GtkWindow *window,
    * no-op. If it eventually is fixed to actually work, change this to
    * a run-time check of GTK+ version. Remember to change also the
    * function with the same name in libgimp/gimpui.c
+   *
+   * Note: this hanging bug is still happening with GTK+3 as of 2019-10,
+   * with steps described in comment 4 in:
+   * https://bugzilla.gnome.org/show_bug.cgi?id=359538
    */
 #ifndef GDK_WINDOWING_WIN32
   GdkWindow *parent;
diff --git a/libgimp/gimpui.c b/libgimp/gimpui.c
index 5457364daa..70dbd2b3b5 100644
--- a/libgimp/gimpui.c
+++ b/libgimp/gimpui.c
@@ -416,6 +416,9 @@ gimp_window_set_transient_for (GtkWindow *window,
 {
   gtk_window_set_transient_for (window, NULL);
 
+  /* To know why it is disabled on Win32, see
+   * gimp_window_set_transient_for() in app/widgets/gimpwidgets-utils.c.
+   */
 #ifndef GDK_WINDOWING_WIN32
   g_signal_handlers_disconnect_matched (window, G_SIGNAL_MATCH_FUNC,
                                         0, 0, NULL,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]