Philipp Hörist pushed to branch master at gajim / gajim


Commits:
42806117 by Philipp Hörist at 2025-08-20T00:15:09+02:00
fix: MessageInput: Don’t remove selection on right click

- - - - -


1 changed file:

- gajim/gtk/message_input.py


Changes:

=====================================
gajim/gtk/message_input.py
=====================================
@@ -219,8 +219,12 @@ def _on_secondary_click(
         # Place the cursor at click position to trigger an update
         # for spelling suggestions, see:
         # https://gitlab.gnome.org/GNOME/libspelling/-/issues/5
-        _, iter_, _ = self.get_iter_at_position(int(x), int(y))
         buf = self.get_buffer()
+        if buf.get_has_selection():
+            # Don't place cursor if text is selected, otherwise the selection 
is changed
+            return Gdk.EVENT_PROPAGATE
+
+        _, iter_, _ = self.get_iter_at_position(int(x), int(y))
         buf.place_cursor(iter_)
         return Gdk.EVENT_PROPAGATE
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/42806117cd1f0d41516c9dd8adc636d5d492700f

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/42806117cd1f0d41516c9dd8adc636d5d492700f
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to