Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
e3366360 by wurstsalat at 2023-05-19T22:11:18+02:00
fix: ChatActionProcessor: Allow to click items with mouse cursor
Fixes #11445
- - - - -
1 changed file:
- gajim/gtk/chat_action_processor.py
Changes:
=====================================
gajim/gtk/chat_action_processor.py
=====================================
@@ -107,9 +107,18 @@ def _on_key_press(self,
return False
def _on_focus_out(self, *args: Any) -> bool:
- # Add 100 ms timeout in order to process potential menu item click
- # events (which will emit focus-out-event on the message input)
- GLib.timeout_add(100, self.popdown)
+ win = self.get_window()
+ default_display = Gdk.Display.get_default()
+ if default_display is not None:
+ pointer = default_display.get_default_seat().get_pointer()
+ if win is not None and pointer is not None:
+ _win, x_pos, y_pos, _mod = win.get_device_position(pointer)
+ rect = self.get_allocation()
+ if (x_pos not in range(0, rect.width) or
+ y_pos not in range(0, rect.height)):
+ # Only popdown if click is outside of Popover's Rectangle
+ self.popdown()
+
return False
def _on_popover_closed(self, _popover: Gtk.Popover) -> None:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e3366360fa6448a54ab28369828293953edc1a7c
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e3366360fa6448a54ab28369828293953edc1a7c
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits