From 84e362860615fba70ec2a6d0f8d108301ef42cb2 Mon Sep 17 00:00:00 2001 From: yutent Date: Tue, 1 Aug 2023 19:34:31 +0800 Subject: [PATCH] fuxk --- main.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 930de2e..82ff652 100755 --- a/main.py +++ b/main.py @@ -82,8 +82,8 @@ class WebKitWindow(Gtk.Window): im = self.webview.get_input_method_context() im.set_enable_preedit(True) - # self.webview.load_uri("app:///index.html") - self.webview.load_uri("https://benchmark.wkit.fun") + self.webview.load_uri("app:///index.html") + # self.webview.load_uri("https://benchmark.wkit.fun") # 解决输入法候选框跟随问题 @@ -95,12 +95,21 @@ class WebKitWindow(Gtk.Window): self.clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD) + # button = Gtk.Button() + + # gset = Gtk.Settings.get_default() + + # set_string_property, set_property_value + # gset.set_property('gtk-cursor-theme-name', 'Bibata-Modern-Classic') + self.add(self.webview) + # self.add(button) def on_preedit_changed(self, im): - p = self.display.get_pointer() # 光标位置 + seat = self.display.get_default_seat() + p = seat.get_pointer().get_position() # 光标位置 x, y = self.get_position() # 窗口位置 im.notify_focus_in()