mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
app, libgimp*: window handle on Windows have the type HANDLE.
Instead of passing a guint32, pass the proper type, since our the HANDLE type can be 64-bit on Windows (according to links I found). I was hoping it might be the reason for the breakage under Windows, though I also found Microsoft documentation saying that the 64-bit handle can be safely truncated: https://learn.microsoft.com/en-us/windows/win32/winprog64/interprocess-communication?redirectedfrom=MSDN Nevertheless I'd appreciate testing again from NikcDC or anyone else, as I reactivated setting transient between processes on Windows. Note that I also pass the proper types on X11 now (Window), even though guint32 worked fine. Better be thorough.
This commit is contained in:
parent
73e6d4b76c
commit
9a57ab54e9
3 changed files with 64 additions and 42 deletions
|
@ -1130,20 +1130,20 @@ gimp_widget_set_handle_on_mapped (GtkWidget *widget,
|
|||
#ifdef GDK_WINDOWING_WIN32
|
||||
if (GDK_IS_WIN32_WINDOW (surface))
|
||||
{
|
||||
guint32 id;
|
||||
HANDLE id;
|
||||
|
||||
id = GPOINTER_TO_INT (GDK_WINDOW_HWND (gtk_widget_get_window (GTK_WIDGET (widget))));
|
||||
handle = g_bytes_new (&id, sizeof (guint32));
|
||||
id = GDK_WINDOW_HWND (gtk_widget_get_window (GTK_WIDGET (widget)));
|
||||
handle = g_bytes_new (&id, sizeof (HANDLE));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (GDK_IS_X11_WINDOW (surface))
|
||||
{
|
||||
guint32 id;
|
||||
Window id;
|
||||
|
||||
id = GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (widget)));
|
||||
handle = g_bytes_new (&id, sizeof (guint32));
|
||||
handle = g_bytes_new (&id, sizeof (Window));
|
||||
}
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue