Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fcitx5-gtk for openSUSE:Factory checked in at 2022-03-12 17:15:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fcitx5-gtk (Old) and /work/SRC/openSUSE:Factory/.fcitx5-gtk.new.25692 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fcitx5-gtk" Sat Mar 12 17:15:33 2022 rev:3 rq:961209 version:5.0.13 Changes: -------- --- /work/SRC/openSUSE:Factory/fcitx5-gtk/fcitx5-gtk.changes 2022-02-13 00:16:13.068255971 +0100 +++ /work/SRC/openSUSE:Factory/.fcitx5-gtk.new.25692/fcitx5-gtk.changes 2022-03-12 17:16:16.786361322 +0100 @@ -1,0 +2,11 @@ +Sat Mar 12 09:51:57 UTC 2022 - Marguerite Su <i...@marguerite.su> + +- update version 5.0.13 + * Revert to use the shared font map + * Keep gtkinputwindow screen to be same as the client_window + otherwise for application that opens multiple Gdk display, + it may cause issue + * check if prgname is not null + * Implement ProcessKeyEventBatch in gclient + +------------------------------------------------------------------- Old: ---- fcitx5-gtk-5.0.12.tar.xz New: ---- fcitx5-gtk-5.0.13.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fcitx5-gtk.spec ++++++ --- /var/tmp/diff_new_pack.4lp0qc/_old 2022-03-12 17:16:17.210361812 +0100 +++ /var/tmp/diff_new_pack.4lp0qc/_new 2022-03-12 17:16:17.210361812 +0100 @@ -17,7 +17,7 @@ Name: fcitx5-gtk -Version: 5.0.12 +Version: 5.0.13 Release: 0 Summary: Gtk im module for fcitx5 and glib based dbus client library License: LGPL-2.1-or-later ++++++ fcitx5-gtk-5.0.12.tar.xz -> fcitx5-gtk-5.0.13.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/CMakeLists.txt new/fcitx5-gtk-5.0.13/CMakeLists.txt --- old/fcitx5-gtk-5.0.12/CMakeLists.txt 2022-02-02 00:50:31.852361200 +0100 +++ new/fcitx5-gtk-5.0.13/CMakeLists.txt 2022-03-09 19:25:54.213611100 +0100 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.6) -project(fcitx5-gtk VERSION 5.0.12) +project(fcitx5-gtk VERSION 5.0.13) find_package(ECM REQUIRED 1.0.0) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/fcitx-gclient/fcitxgclient.c new/fcitx5-gtk-5.0.13/fcitx-gclient/fcitxgclient.c --- old/fcitx5-gtk-5.0.12/fcitx-gclient/fcitxgclient.c 2021-11-10 05:10:02.945384700 +0100 +++ new/fcitx5-gtk-5.0.13/fcitx-gclient/fcitxgclient.c 2022-02-21 05:57:07.740442800 +0100 @@ -51,6 +51,8 @@ GCancellable *cancellable; FcitxGWatcher *watcher; guint watch_id; + + guint32 version; }; static const gchar introspection_xml[] = @@ -61,6 +63,9 @@ " <arg direction=\"out\" type=\"o\"/>\n" " <arg direction=\"out\" type=\"ay\"/>\n" " </method>\n" + " <method name=\"Version\">\n" + " <arg direction=\"out\" type=\"u\"/>\n" + " </method>\n" " </interface>" "</node>"; @@ -108,6 +113,15 @@ " <arg name=\"time\" direction=\"in\" type=\"u\"/>\n" " <arg name=\"ret\" direction=\"out\" type=\"b\"/>\n" " </method>\n" + " <method name=\"ProcessKeyEventBatch\">\n" + " <arg name=\"keyval\" direction=\"in\" type=\"u\"/>\n" + " <arg name=\"keycode\" direction=\"in\" type=\"u\"/>\n" + " <arg name=\"state\" direction=\"in\" type=\"u\"/>\n" + " <arg name=\"isRelease\" direction=\"in\" type=\"b\"/>\n" + " <arg name=\"time\" direction=\"in\" type=\"u\"/>\n" + " <arg name=\"event\" direction=\"out\" type=\"a(uv)\"/>\n" + " <arg name=\"ret\" direction=\"out\" type=\"b\"/>\n" + " </method>\n" " <method name=\"PrevPage\">\n" " </method>\n" " <method name=\"NextPage\">\n" @@ -163,6 +177,9 @@ LAST_SIGNAL }; +// This need to kept in sync with dbusfrontend.cpp +enum { BATCHED_COMMIT_STRING = 0, BATCHED_PREEDIT, BATCHED_FORWARD_KEY }; + static guint signals[LAST_SIGNAL] = {0}; static GDBusInterfaceInfo *_fcitx_g_client_get_interface_info(void); @@ -179,6 +196,8 @@ static void _fcitx_g_client_create_ic_phase1_finished(GObject *source_object, GAsyncResult *res, gpointer user_data); +static void _fcitx_g_client_version_cb(GObject *source_object, + GAsyncResult *res, gpointer user_data); static void _fcitx_g_client_create_ic_cb(GObject *source_object, GAsyncResult *res, gpointer user_data); static void _fcitx_g_client_create_ic_phase2_finished(GObject *source_object, @@ -189,6 +208,12 @@ gpointer user_data); static void _fcitx_g_client_clean_up(FcitxGClient *self); static gboolean _fcitx_g_client_recheck(gpointer user_data); +static void _fcitx_g_client_handle_forward_key(FcitxGClient *self, + GVariant *parameters); +static void _fcitx_g_client_handle_commit_string(FcitxGClient *self, + GVariant *parameters); +static void _fcitx_g_client_handle_preedit(FcitxGClient *self, + GVariant *parameters); static void fcitx_g_client_finalize(GObject *object); static void fcitx_g_client_dispose(GObject *object); @@ -343,6 +368,7 @@ self->priv->display = NULL; self->priv->program = NULL; self->priv->watch_id = 0; + self->priv->version = 0; } static void fcitx_g_client_constructed(GObject *object) { @@ -543,6 +569,39 @@ } } +gboolean _fcitx_g_client_handle_process_key_reply(FcitxGClient *self, + GVariant *result) { + + gboolean ret = FALSE; + if (self->priv->version > 0) { + g_autoptr(GVariantIter) iter = NULL; + g_variant_get(result, "(a(uv)b)", &iter, &ret); + GVariant *event; + while ((event = g_variant_iter_next_value(iter))) { + GVariant *data; + guint32 type; + g_variant_get(event, "(uv)", &type, &data); + switch (type) { + case BATCHED_COMMIT_STRING: + _fcitx_g_client_handle_commit_string(self, data); + break; + case BATCHED_FORWARD_KEY: + _fcitx_g_client_handle_forward_key(self, data); + break; + case BATCHED_PREEDIT: + _fcitx_g_client_handle_preedit(self, data); + break; + default: + break; + } + g_variant_unref(event); + } + } else { + g_variant_get(result, "(b)", &ret); + } + return ret; +} + /** * fcitx_g_client_process_key_finish: * @self: A #FcitxGClient @@ -557,10 +616,10 @@ g_return_val_if_fail(fcitx_g_client_is_valid(self), FALSE); gboolean ret = FALSE; - GVariant *result = g_dbus_proxy_call_finish(self->priv->icproxy, res, NULL); + g_autoptr(GVariant) result = + g_dbus_proxy_call_finish(self->priv->icproxy, res, NULL); if (result) { - g_variant_get(result, "(b)", &ret); - g_variant_unref(result); + ret = _fcitx_g_client_handle_process_key_reply(self, result); } return ret; } @@ -604,8 +663,10 @@ pk->self = g_object_ref(self); pk->callback = callback; pk->user_data = user_data; + const char *method = + (self->priv->version > 0) ? "ProcessKeyEventBatch" : "ProcessKeyEvent"; g_dbus_proxy_call( - self->priv->icproxy, "ProcessKeyEvent", + self->priv->icproxy, method, g_variant_new("(uuubu)", keyval, keycode, state, isRelease, t), G_DBUS_CALL_FLAGS_NONE, timeout_msec, cancellable, _fcitx_g_client_process_key_cb, pk); @@ -629,16 +690,17 @@ gboolean isRelease, guint32 t) { g_return_val_if_fail(fcitx_g_client_is_valid(self), FALSE); gboolean ret = FALSE; - GVariant *result = g_dbus_proxy_call_sync( - self->priv->icproxy, "ProcessKeyEvent", + + const char *method = + (self->priv->version > 0) ? "ProcessKeyEventBatch" : "ProcessKeyEvent"; + g_autoptr(GVariant) result = g_dbus_proxy_call_sync( + self->priv->icproxy, method, g_variant_new("(uuubu)", keyval, keycode, state, isRelease, t), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL); if (result) { - g_variant_get(result, "(b)", &ret); - g_variant_unref(result); + ret = _fcitx_g_client_handle_process_key_reply(self, result); } - return ret; } @@ -719,6 +781,35 @@ self->priv->cancellable = g_cancellable_new(); + g_dbus_proxy_call(self->priv->improxy, "Version", NULL, + G_DBUS_CALL_FLAGS_NONE, -1, /* timeout */ + self->priv->cancellable, _fcitx_g_client_version_cb, + self); +} + +static void _fcitx_g_client_version_cb(G_GNUC_UNUSED GObject *source_object, + GAsyncResult *res, gpointer user_data) { + FcitxGClient *self = (FcitxGClient *)user_data; + g_clear_object(&self->priv->cancellable); + + g_autoptr(GError) error = NULL; + g_autoptr(GVariant) result = + g_dbus_proxy_call_finish(G_DBUS_PROXY(source_object), res, &error); + + if (error && g_dbus_error_is_remote_error(error) && + g_strcmp0(g_dbus_error_get_remote_error(error), + "org.freedesktop.DBus.Error.UnknownMethod") == 0) { + self->priv->version = 0; + } else if (result) { + g_variant_get(result, "(u)", &self->priv->version); + } else { + _fcitx_g_client_clean_up(self); + g_object_unref(self); + return; + } + + self->priv->cancellable = g_cancellable_new(); + GVariantBuilder builder; g_variant_builder_init(&builder, G_VARIANT_TYPE("a(ss)")); if (self->priv->display) { @@ -751,9 +842,9 @@ GVariantIter iter, inner; g_variant_iter_init(&iter, result); - GVariant *pathVariant = g_variant_iter_next_value(&iter); + g_autoptr(GVariant) pathVariant = g_variant_iter_next_value(&iter); const gchar *path = g_variant_get_string(pathVariant, NULL); - GVariant *uuidVariant = g_variant_iter_next_value(&iter); + g_autoptr(GVariant) uuidVariant = g_variant_iter_next_value(&iter); size_t size = g_variant_iter_init(&inner, uuidVariant); if (size == 16) { int i = 0; @@ -761,6 +852,7 @@ while ((byte = g_variant_iter_next_value(&inner))) { self->priv->uuid[i] = g_variant_get_byte(byte); i++; + g_variant_unref(byte); } } @@ -834,17 +926,62 @@ g_variant_iter_free(iter); } +static void _fcitx_g_client_handle_forward_key(FcitxGClient *self, + GVariant *parameters) { + guint32 key, state; + gboolean isRelease; + if (g_strcmp0(g_variant_get_type_string(parameters), "uub") == 0) { + g_variant_get(parameters, "uub", &key, &state, &isRelease); + } else if (g_strcmp0(g_variant_get_type_string(parameters), "(uub)") == 0) { + g_variant_get(parameters, "(uub)", &key, &state, &isRelease); + } else { + return; + } + g_signal_emit(self, signals[FORWARD_KEY_SIGNAL], 0, key, state, isRelease); +} + +static void _fcitx_g_client_handle_commit_string(FcitxGClient *self, + GVariant *parameters) { + gchar *data = NULL; + if (g_strcmp0(g_variant_get_type_string(parameters), "s") == 0) { + g_variant_get(parameters, "s", &data); + } else if (g_strcmp0(g_variant_get_type_string(parameters), "(s)") == 0) { + g_variant_get(parameters, "(s)", &data); + } else { + return; + } + if (data) { + g_signal_emit(self, signals[COMMIT_STRING_SIGNAL], 0, data); + } + g_free(data); +} + +static void _fcitx_g_client_handle_preedit(FcitxGClient *self, + GVariant *parameters) { + int cursor_pos; + GVariantIter *iter; + if (g_strcmp0(g_variant_get_type_string(parameters), "a(si)i") == 0) { + g_variant_get(parameters, "a(si)i", &iter, &cursor_pos); + } else if (g_strcmp0(g_variant_get_type_string(parameters), "(a(si)i)") == + 0) { + g_variant_get(parameters, "(a(si)i)", &iter, &cursor_pos); + } else { + return; + } + + GPtrArray *array = g_ptr_array_new_with_free_func(_item_free); + buildFormattedTextArray(array, iter); + g_signal_emit(self, signals[UPDATED_FORMATTED_PREEDIT_SIGNAL], 0, array, + cursor_pos); + g_ptr_array_free(array, TRUE); +} + static void _fcitx_g_client_g_signal(G_GNUC_UNUSED GDBusProxy *proxy, G_GNUC_UNUSED gchar *sender_name, gchar *signal_name, GVariant *parameters, gpointer user_data) { if (g_strcmp0(signal_name, "CommitString") == 0) { - gchar *data = NULL; - g_variant_get(parameters, "(s)", &data); - if (data) { - g_signal_emit(user_data, signals[COMMIT_STRING_SIGNAL], 0, data); - } - g_free(data); + _fcitx_g_client_handle_commit_string(user_data, parameters); } else if (g_strcmp0(signal_name, "CurrentIM") == 0) { gchar *name = NULL; gchar *uniqueName = NULL; @@ -858,11 +995,7 @@ g_free(uniqueName); g_free(langCode); } else if (g_strcmp0(signal_name, "ForwardKey") == 0) { - guint32 key, state; - gboolean isRelease; - g_variant_get(parameters, "(uub)", &key, &state, &isRelease); - g_signal_emit(user_data, signals[FORWARD_KEY_SIGNAL], 0, key, state, - isRelease); + _fcitx_g_client_handle_forward_key(user_data, parameters); } else if (g_strcmp0(signal_name, "DeleteSurroundingText") == 0) { guint32 nchar; gint32 offset; @@ -870,15 +1003,7 @@ g_signal_emit(user_data, signals[DELETE_SURROUNDING_TEXT_SIGNAL], 0, offset, nchar); } else if (g_strcmp0(signal_name, "UpdateFormattedPreedit") == 0) { - int cursor_pos; - GPtrArray *array = g_ptr_array_new_with_free_func(_item_free); - GVariantIter *iter; - g_variant_get(parameters, "(a(si)i)", &iter, &cursor_pos); - - buildFormattedTextArray(array, iter); - g_signal_emit(user_data, signals[UPDATED_FORMATTED_PREEDIT_SIGNAL], 0, - array, cursor_pos); - g_ptr_array_free(array, TRUE); + _fcitx_g_client_handle_preedit(user_data, parameters); } else if (g_strcmp0(signal_name, "UpdateClientSideUI") == 0) { int preedit_cursor_pos = -1, candidate_cursor_pos = -1, layout_hint = 0; gboolean has_prev = FALSE, has_next = FALSE; @@ -1004,6 +1129,7 @@ g_bus_unwatch_name(self->priv->watch_id); self->priv->watch_id = 0; } + self->priv->version = 0; } // kate: indent-mode cstyle; replace-tabs on; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/gtk-common/marshall.list new/fcitx5-gtk-5.0.13/gtk-common/marshall.list --- old/fcitx5-gtk-5.0.12/gtk-common/marshall.list 2021-01-24 22:04:17.988359000 +0100 +++ new/fcitx5-gtk-5.0.13/gtk-common/marshall.list 2022-02-21 05:57:07.740442800 +0100 @@ -3,4 +3,4 @@ VOID:STRING,INT VOID:BOXED,INT VOID:INT,UINT -VOID:BOXED,INT,BOXED,BOXED,BOXED,INT,INT,BOOL,BOOL +VOID:BOXED,INT,BOXED,BOXED,BOXED,INT,INT,BOOLEAN,BOOLEAN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/gtk2/fcitximcontext.cpp new/fcitx5-gtk-5.0.13/gtk2/fcitximcontext.cpp --- old/fcitx5-gtk-5.0.12/gtk2/fcitximcontext.cpp 2022-01-26 01:49:19.372307800 +0100 +++ new/fcitx5-gtk-5.0.13/gtk2/fcitximcontext.cpp 2022-02-21 05:57:07.740442800 +0100 @@ -223,6 +223,9 @@ static gboolean check_app_name(const gchar *pattern) { bool result = FALSE; const gchar *prgname = g_get_prgname(); + if (!prgname) { + return FALSE; + } gchar **p; gchar **apps = g_strsplit(pattern, ",", 0); for (p = apps; *p != NULL; p++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/gtk3/fcitximcontext.cpp new/fcitx5-gtk-5.0.13/gtk3/fcitximcontext.cpp --- old/fcitx5-gtk-5.0.12/gtk3/fcitximcontext.cpp 2022-01-29 03:20:01.771023300 +0100 +++ new/fcitx5-gtk-5.0.13/gtk3/fcitximcontext.cpp 2022-02-21 05:57:07.740442800 +0100 @@ -262,6 +262,9 @@ static gboolean check_app_name(const gchar *pattern) { bool result = FALSE; const gchar *prgname = g_get_prgname(); + if (!prgname) { + return FALSE; + } gchar **p; gchar **apps = g_strsplit(pattern, ",", 0); for (p = apps; *p != NULL; p++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/gtk3/gtk3inputwindow.cpp new/fcitx5-gtk-5.0.13/gtk3/gtk3inputwindow.cpp --- old/fcitx5-gtk-5.0.12/gtk3/gtk3inputwindow.cpp 2022-01-19 19:03:24.947146400 +0100 +++ new/fcitx5-gtk-5.0.13/gtk3/gtk3inputwindow.cpp 2022-02-21 06:25:33.487420600 +0100 @@ -48,6 +48,9 @@ g_object_add_weak_pointer(G_OBJECT(parent), reinterpret_cast<gpointer *>(&parent_)); if (window_) { + gtk_window_set_screen(GTK_WINDOW(window_.get()), + gdk_window_get_screen(parent)); + gtk_widget_realize(window_.get()); auto window = gtk_widget_get_window(window_.get()); if (window) { gdk_window_set_transient_for(window, parent); @@ -76,12 +79,13 @@ } void Gtk3InputWindow::update() { - init(); if (visible() && parent_) { + init(); pango_cairo_context_set_font_options( context_.get(), gdk_screen_get_font_options(gtk_widget_get_screen(window_.get()))); dpi_ = gdk_screen_get_resolution(gtk_widget_get_screen(window_.get())); + pango_cairo_context_set_resolution(context_.get(), dpi_); std::tie(width_, height_) = sizeHint(); gtk_widget_realize(window_.get()); @@ -89,7 +93,7 @@ gtk_widget_queue_draw(window_.get()); reposition(); gtk_widget_show_all(window_.get()); - } else { + } else if (window_) { gtk_widget_hide(window_.get()); } } @@ -98,8 +102,12 @@ if (window_) { return; } + if (!parent_) { + return; + } window_.reset(gtk_window_new(GTK_WINDOW_POPUP)); auto window = window_.get(); + gtk_window_set_screen(GTK_WINDOW(window), gdk_window_get_screen(parent_)); gtk_container_set_border_width(GTK_CONTAINER(window), 0); gtk_window_set_decorated(GTK_WINDOW(window), false); @@ -149,8 +157,7 @@ g_signal_connect(G_OBJECT(window), "button-release-event", G_CALLBACK(+release), this); gtk_widget_realize(window_.get()); - if (auto gdkWindow = gtk_widget_get_window(window_.get()); - gdkWindow && parent_) { + if (auto gdkWindow = gtk_widget_get_window(window_.get())) { gdk_window_set_transient_for(gdkWindow, parent_); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/gtk3/inputwindow.cpp new/fcitx5-gtk-5.0.13/gtk3/inputwindow.cpp --- old/fcitx5-gtk-5.0.12/gtk3/inputwindow.cpp 2022-01-26 19:14:50.237119400 +0100 +++ new/fcitx5-gtk-5.0.13/gtk3/inputwindow.cpp 2022-02-21 06:25:33.487420600 +0100 @@ -89,8 +89,8 @@ InputWindow::InputWindow(ClassicUIConfig *config, FcitxGClient *client) : config_(config), client_(FCITX_G_CLIENT(g_object_ref(client))) { - fontMap_.reset(pango_cairo_font_map_new()); - context_.reset(pango_font_map_create_context(fontMap_.get())); + context_.reset( + pango_font_map_create_context(pango_cairo_font_map_get_default())); upperLayout_ = newPangoLayout(context_.get()); lowerLayout_ = newPangoLayout(context_.get()); @@ -384,11 +384,6 @@ std::pair<unsigned int, unsigned int> InputWindow::sizeHint() { auto *fontDesc = pango_font_description_from_string(config_->font_.data()); pango_context_set_font_description(context_.get(), fontDesc); - if (dpi_ > 0) { - pango_cairo_font_map_set_resolution( - PANGO_CAIRO_FONT_MAP(fontMap_.get()), dpi_); - } - pango_cairo_context_set_resolution(context_.get(), dpi_); pango_font_description_free(fontDesc); pango_layout_context_changed(upperLayout_.get()); pango_layout_context_changed(lowerLayout_.get()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/gtk3/inputwindow.h new/fcitx5-gtk-5.0.13/gtk3/inputwindow.h --- old/fcitx5-gtk-5.0.12/gtk3/inputwindow.h 2022-01-26 19:14:50.233786000 +0100 +++ new/fcitx5-gtk-5.0.13/gtk3/inputwindow.h 2022-02-21 06:23:16.609660100 +0100 @@ -96,7 +96,6 @@ ClassicUIConfig *config_; GObjectUniquePtr<FcitxGClient> client_; - GObjectUniquePtr<PangoFontMap> fontMap_; GObjectUniquePtr<PangoContext> context_; GObjectUniquePtr<PangoLayout> upperLayout_; GObjectUniquePtr<PangoLayout> lowerLayout_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-gtk-5.0.12/gtk4/gtk4inputwindow.cpp new/fcitx5-gtk-5.0.13/gtk4/gtk4inputwindow.cpp --- old/fcitx5-gtk-5.0.12/gtk4/gtk4inputwindow.cpp 2021-10-30 19:37:51.996451600 +0200 +++ new/fcitx5-gtk-5.0.13/gtk4/gtk4inputwindow.cpp 2022-02-21 06:25:33.487420600 +0100 @@ -179,6 +179,7 @@ pango_cairo_context_set_font_options( context_.get(), pango_cairo_context_get_font_options(context)); dpi_ = pango_cairo_context_get_resolution(context); + pango_cairo_context_set_resolution(context_.get(), dpi_); } gboolean Gtk4InputWindow::event(GdkEvent *event) {