mirror of https://github.com/GNOME/gimp.git
libgimp: change signature of get_window() of GimpProgressVtable.
As diagnosed in #8649, using a guint32 for windows identifier may have been right long ago (was it?), but is definitely not anymore. I can see that a XID is an unsigned long nowadays (usually 64-bit on 64-bit Linux). As far as I can see, on Windows, it would be a void* behind (which also corresponds to the error message in #8649 description): > typedef void *PVOID; > typedef PVOID HANDLE; > typedef HANDLE HWND; Cf. https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types I *think* that pointers would be 64-bit on Windows 64-bit, though I'm unsure (after all, this is an OS with 32-bit long int on 64-bit arch!). Anyway, it's just better to move to 64-bit window identifiers.
This commit is contained in:
parent
a93249fa65
commit
a021b1999a
|
@ -382,7 +382,7 @@ gimp_temp_progress_run (GimpProcedure *procedure,
|
|||
case GIMP_PROGRESS_COMMAND_GET_WINDOW:
|
||||
{
|
||||
GimpValueArray *return_vals;
|
||||
guint32 window_id = 0;
|
||||
guint64 window_id = 0;
|
||||
|
||||
if (progress_data->vtable.get_window)
|
||||
window_id = progress_data->vtable.get_window (progress_data->data);
|
||||
|
|
|
@ -81,7 +81,7 @@ typedef void (* GimpProgressVtablePulseFunc) (gpointer user_data);
|
|||
*
|
||||
* Returns: the ID of the window where the progress is displayed.
|
||||
*/
|
||||
typedef guint32 (* GimpProgressVtableGetWindowFunc) (gpointer user_data);
|
||||
typedef guint64 (* GimpProgressVtableGetWindowFunc) (gpointer user_data);
|
||||
|
||||
|
||||
typedef struct _GimpProgressVtable GimpProgressVtable;
|
||||
|
|
|
@ -63,7 +63,7 @@ static void gimp_progress_bar_set_text (const gchar *message,
|
|||
static void gimp_progress_bar_set_value (gdouble percentage,
|
||||
gpointer user_data);
|
||||
static void gimp_progress_bar_pulse (gpointer user_data);
|
||||
static guint32 gimp_progress_bar_get_window (gpointer user_data);
|
||||
static guint64 gimp_progress_bar_get_window (gpointer user_data);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpProgressBar, gimp_progress_bar, GTK_TYPE_PROGRESS_BAR)
|
||||
|
@ -180,7 +180,7 @@ gimp_progress_bar_pulse (gpointer user_data)
|
|||
gtk_main_iteration ();
|
||||
}
|
||||
|
||||
static guint32
|
||||
static guint64
|
||||
gimp_window_get_native_id (GtkWindow *window)
|
||||
{
|
||||
GdkWindow *surface;
|
||||
|
@ -209,7 +209,7 @@ gimp_window_get_native_id (GtkWindow *window)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static guint32
|
||||
static guint64
|
||||
gimp_progress_bar_get_window (gpointer user_data)
|
||||
{
|
||||
GimpProgressBar *bar = GIMP_PROGRESS_BAR (user_data);
|
||||
|
|
Loading…
Reference in New Issue