linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05417
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2876: another attempt at fixing chat scrolling / flickering
------------------------------------------------------------
revno: 2876
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2012-03-05 21:48:24 +0100
message:
another attempt at fixing chat scrolling / flickering
modified:
changelog.txt
dwt/src/widgets/TextBox.cpp
win32/HtmlToRtf.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2012-03-03 13:42:56 +0000
+++ changelog.txt 2012-03-05 20:48:24 +0000
@@ -18,6 +18,7 @@
* Apply user matching definition styles to nicks in chats (poy)
* Fix favorite hub groups on Win XP (poy)
* [L#925659] Safer window cleanup (poy)
+* Reduce chat flickering (bigmuscle)
* [L#923612] Show the last chat line in taskbar previews (poy)
* Show chat logs with a dim text color (poy)
* Re-add lost user information tooltips (poy)
=== modified file 'dwt/src/widgets/TextBox.cpp'
--- dwt/src/widgets/TextBox.cpp 2012-02-12 14:20:18 +0000
+++ dwt/src/widgets/TextBox.cpp 2012-03-05 20:48:24 +0000
@@ -149,14 +149,7 @@
void TextBoxBase::scrollToBottom() {
// this function takes care of various corner cases (not fully scrolled, scrolled too far...)
- auto sel = getCaretPosRange();
-
- setSelection(length());
- showCaret();
-
- // restore the previous selection
- setSelection(sel.first, sel.second);
-
+ sendMessage(WM_VSCROLL, SB_BOTTOM);
sendMessage(WM_VSCROLL, SB_BOTTOM);
}
@@ -222,6 +215,7 @@
// keep the scroll position at the end if it already was at the end
if((msg.message == WM_SIZE || msg.message == WM_MOVE) && hasStyle(WS_VSCROLL) && scrollIsAtEnd()) {
retVal = getDispatcher().chain(msg);
+ redraw(true);
scrollToBottom();
return true;
}
=== modified file 'win32/HtmlToRtf.cpp'
--- win32/HtmlToRtf.cpp 2012-02-17 20:56:23 +0000
+++ win32/HtmlToRtf.cpp 2012-03-05 20:48:24 +0000
@@ -92,7 +92,7 @@
return;
}
- contexts.emplace_back(contexts.back());
+ contexts.push_back(contexts.back());
ScopedFunctor([this] { write(contexts.back()); });
if(name == "b") {