fuxk
parent
5b0ec56c5b
commit
84e3628606
15
main.py
15
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()
|
||||
|
|
Reference in New Issue