From 722d3d1ad456fe4a30b1f00de44e08226b816ee3 Mon Sep 17 00:00:00 2001 From: Hysterical Raisins Date: Thu, 4 Jul 2019 21:46:14 +0200 Subject: [PATCH 1/5] Cleanups: fix deprecations gtk_widget_get_root_window() gdk_screen_get_monitor_at_window() gdk_screen_get_monitor_geometry() --- src/server-context-service.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/server-context-service.c b/src/server-context-service.c index 32e3b078..69b4593d 100644 --- a/src/server-context-service.c +++ b/src/server-context-service.c @@ -217,16 +217,18 @@ static void set_geometry (ServerContextService *context) { GdkScreen *screen; + GdkDisplay *display; GdkWindow *root; - gint monitor; + GdkMonitor *monitor; GdkRectangle rect; const EekKeyboard *keyboard; EekBounds bounds; screen = gdk_screen_get_default (); - root = gtk_widget_get_root_window (context->window); - monitor = gdk_screen_get_monitor_at_window (screen, root); - gdk_screen_get_monitor_geometry (screen, monitor, &rect); + root = gdk_screen_get_root_window (screen); + display = gdk_display_get_default(); + monitor = gdk_display_get_monitor_at_window (display, root); + gdk_monitor_get_geometry (monitor, &rect); keyboard = eekboard_context_service_get_keyboard (EEKBOARD_CONTEXT_SERVICE(context)); eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds); From eaf925e30b9cd1af093b0d149d33673b66cf60f9 Mon Sep 17 00:00:00 2001 From: Hysterical Raisins Date: Thu, 4 Jul 2019 22:11:24 +0200 Subject: [PATCH 2/5] Cleanups: fix g_type_init() deprecation warning None of this seems necessary anymore. This file could be axed, but leave it for now. --- eek/eek.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/eek/eek.c b/eek/eek.c index 8c037163..6524b387 100644 --- a/eek/eek.c +++ b/eek/eek.c @@ -38,9 +38,5 @@ void eek_init (void) { - g_type_init (); - - g_type_class_ref (EEK_TYPE_SYMBOL); - g_type_class_ref (EEK_TYPE_KEYSYM); - g_type_class_ref (EEK_TYPE_TEXT); + /* void */ } From 1d1829f6648c86dff2274c3d94a075cf9c5d7465 Mon Sep 17 00:00:00 2001 From: Hysterical Raisins Date: Mon, 8 Jul 2019 08:56:05 +0200 Subject: [PATCH 3/5] fix accidentally committed line (-Wincompatible-pointer-types) --- eek/eek-section.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eek/eek-section.c b/eek/eek-section.c index 79251f48..d3d69136 100644 --- a/eek/eek-section.c +++ b/eek/eek-section.c @@ -1,17 +1,17 @@ -/* +/* * Copyright (C) 2010-2011 Daiki Ueno * Copyright (C) 2010-2011 Red Hat, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA @@ -129,7 +129,7 @@ static EekKey * eek_section_real_create_key (EekSection *self, guint keycode, gint column_index, - guint row_index) + gint row_index) { EekKey *key; gint num_rows; From a944bf85b86b9f64827bf6e67a4673e49c39106d Mon Sep 17 00:00:00 2001 From: Hysterical Raisins Date: Mon, 8 Jul 2019 09:02:03 +0200 Subject: [PATCH 4/5] remove stray const (-Wdiscarded-qualifiers) --- src/server-context-service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server-context-service.c b/src/server-context-service.c index 69b4593d..a5629e9b 100644 --- a/src/server-context-service.c +++ b/src/server-context-service.c @@ -221,7 +221,7 @@ set_geometry (ServerContextService *context) GdkWindow *root; GdkMonitor *monitor; GdkRectangle rect; - const EekKeyboard *keyboard; + EekKeyboard *keyboard; EekBounds bounds; screen = gdk_screen_get_default (); From 66ec95ebb0975c79db2f3282ea264ffdb32abf18 Mon Sep 17 00:00:00 2001 From: Hysterical Raisins Date: Mon, 8 Jul 2019 09:15:27 +0200 Subject: [PATCH 5/5] fix-up prototypes (-Wincompatible-pointer-types) --- src/imservice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imservice.c b/src/imservice.c index aed73222..4ee756ce 100644 --- a/src/imservice.c +++ b/src/imservice.c @@ -5,8 +5,8 @@ #include "eekboard/eekboard-context-service.h" -void imservice_handle_text_change_cause(void *data, struct zwp_input_method_v2 *input_method) {} -void imservice_handle_content_type(void *data, struct zwp_input_method_v2 *input_method) {} +void imservice_handle_text_change_cause(void *data, struct zwp_input_method_v2 *input_method, uint32_t cause) {} +void imservice_handle_content_type(void *data, struct zwp_input_method_v2 *input_method, uint32_t hint, uint32_t purpose) {} void imservice_handle_unavailable(void *data, struct zwp_input_method_v2 *input_method) {}