don't scroll in groupchat when window doesn't have focus. Fixes #6100
This commit is contained in:
parent
2152411af2
commit
5b5b2375a1
|
@ -522,7 +522,7 @@ class ConversationTextview(gobject.GObject):
|
||||||
del self.xep0184_marks[id_]
|
del self.xep0184_marks[id_]
|
||||||
del self.xep0184_shown[id_]
|
del self.xep0184_shown[id_]
|
||||||
|
|
||||||
def show_focus_out_line(self):
|
def show_focus_out_line(self, scroll=True):
|
||||||
if not self.allow_focus_out_line:
|
if not self.allow_focus_out_line:
|
||||||
# if room did not receive focus-in from the last time we added
|
# if room did not receive focus-in from the last time we added
|
||||||
# --- line then do not readd
|
# --- line then do not readd
|
||||||
|
@ -581,7 +581,9 @@ class ConversationTextview(gobject.GObject):
|
||||||
|
|
||||||
buffer_.end_user_action()
|
buffer_.end_user_action()
|
||||||
|
|
||||||
# scroll to the end (via idle in case the scrollbar has appeared)
|
if scroll:
|
||||||
|
# scroll to the end (via idle in case the scrollbar has
|
||||||
|
# appeared)
|
||||||
gobject.idle_add(self.scroll_to_end)
|
gobject.idle_add(self.scroll_to_end)
|
||||||
|
|
||||||
def show_xep0184_warning_tooltip(self):
|
def show_xep0184_warning_tooltip(self):
|
||||||
|
|
|
@ -1149,7 +1149,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
# we have full focus (we are reading it!)
|
# we have full focus (we are reading it!)
|
||||||
return
|
return
|
||||||
|
|
||||||
self.conv_textview.show_focus_out_line()
|
at_the_end = self.conv_textview.at_the_end()
|
||||||
|
self.conv_textview.show_focus_out_line(scroll=at_the_end)
|
||||||
|
|
||||||
def needs_visual_notification(self, text):
|
def needs_visual_notification(self, text):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue