Merge branch 'wip/otte/for-master' into 'master'

win32: Fix GTK warnings

See merge request GNOME/gtk!3998
This commit is contained in:
Benjamin Otte 2021-09-24 21:46:20 +00:00
commit 8fba0d209e
2 changed files with 9 additions and 8 deletions

View File

@ -684,6 +684,9 @@ gtk_im_context_ime_focus_in (GtkIMContext *context)
g_free (utf8str);
}
break;
default:
g_assert_not_reached ();
break;
}
/* clean */
@ -695,8 +698,6 @@ static void
gtk_im_context_ime_focus_out (GtkIMContext *context)
{
GtkIMContextIME *context_ime = GTK_IM_CONTEXT_IME (context);
HWND hwnd;
HIMC himc;
gboolean was_preediting;
if (!GDK_IS_SURFACE (context_ime->client_surface))
@ -975,16 +976,16 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display,
get_window_position (context_ime->client_surface, &wx, &wy);
/* FIXME! */
{
HWND hwnd;
HWND impl_hwnd;
POINT pt;
RECT rc;
hwnd =
impl_hwnd =
gdk_win32_surface_get_impl_hwnd (context_ime->client_surface);
GetWindowRect (hwnd, &rc);
GetWindowRect (impl_hwnd, &rc);
pt.x = wx;
pt.y = wy;
ClientToScreen (hwnd, &pt);
ClientToScreen (impl_hwnd, &pt);
wx = pt.x - rc.left;
wy = pt.y - rc.top;
}

View File

@ -372,10 +372,10 @@ init_gl (GtkInspectorGeneral *gen)
char *version;
gl_version = epoxy_gl_version ();
version = g_strdup_printf ("WGL %d.%d", gl_version / 10, gl_version % 10, NULL);
version = g_strdup_printf ("WGL %d.%d", gl_version / 10, gl_version % 10);
gtk_label_set_text (GTK_LABEL (gen->gl_version), version);
g_free (version);
gtk_label_set_text (GTK_LABEL (gen->gl_vendor), glGetString (GL_VENDOR));
gtk_label_set_text (GTK_LABEL (gen->gl_vendor), (const char *) glGetString (GL_VENDOR));
append_wgl_extension_row (gen, "WGL_EXT_create_context");
append_wgl_extension_row (gen, "WGL_EXT_swap_control");