mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
Fix various new mingw compiler warnings
These are the result of us missing CI for some time now and MSYS2 having a newer GCC now I guess.
This commit is contained in:
parent
0f2281e267
commit
8f8229dcd2
@ -682,7 +682,7 @@ gtk_im_context_ime_focus_in (GtkIMContext *context)
|
||||
toplevel = context_ime->client_surface;
|
||||
if (GDK_IS_SURFACE (toplevel))
|
||||
{
|
||||
gdk_win32_display_add_filter (gdk_surface_get_display (toplevel),
|
||||
gdk_win32_display_add_filter (GDK_WIN32_DISPLAY (gdk_surface_get_display (toplevel)),
|
||||
gtk_im_context_ime_message_filter, context_ime);
|
||||
}
|
||||
else
|
||||
@ -780,7 +780,7 @@ gtk_im_context_ime_focus_out (GtkIMContext *context)
|
||||
toplevel = context_ime->client_surface;
|
||||
if (GDK_IS_SURFACE (toplevel))
|
||||
{
|
||||
gdk_win32_display_remove_filter (gdk_surface_get_display (toplevel),
|
||||
gdk_win32_display_remove_filter (GDK_WIN32_DISPLAY (gdk_surface_get_display (toplevel)),
|
||||
gtk_im_context_ime_message_filter,
|
||||
context_ime);
|
||||
}
|
||||
|
@ -82,9 +82,8 @@ hello (void)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window, *box;
|
||||
GtkWidget *window;
|
||||
GtkWidget *button = NULL;
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
gtk_init ();
|
||||
|
||||
@ -103,21 +102,25 @@ main (int argc, char *argv[])
|
||||
button = gtk_button_new ();
|
||||
|
||||
#ifdef G_OS_UNIX /* portal usage is supported on *nix only */
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_button_set_label (GTK_BUTTON (button), "copy");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (copy), NULL);
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
{
|
||||
GtkWidget *box;
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_label (GTK_BUTTON (button), "paste");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (paste), NULL);
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_button_set_label (GTK_BUTTON (button), "copy");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (copy), NULL);
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_label (GTK_BUTTON (button), "paste");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (paste), NULL);
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
|
||||
clipboard = gdk_display_get_clipboard (gdk_display_get_default ());
|
||||
g_signal_connect (clipboard, "changed", G_CALLBACK (clipboard_changed), NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
clipboard = gdk_display_get_clipboard (gdk_display_get_default ());
|
||||
g_signal_connect (clipboard, "changed", G_CALLBACK (clipboard_changed), NULL);
|
||||
}
|
||||
#else /* G_OS_UNIX -- original non-portal-enabled code */
|
||||
|
||||
gtk_button_set_label (GTK_BUTTON (button), "hello world");
|
||||
|
Loading…
Reference in New Issue
Block a user