Chat window does not update properly on new message arrival

Bug #710250 reported by Nicolai Hähnle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Nicolai Hähnle

Bug Description

The chat window (actually, the GameChatPanel) does not properly update when new messages arrive.

To reproduce:
1. Open two instances of Widelands locally, in SDL rendering mode
2. Host a game in one of the instance
3. Join the game with the other instance
4. Start the game
5. Open the chat window in the host instance
6. Start writing several chat message from the client
7. Arrange the windows such that you can observe incoming chat messages in the host instance when writing them in the client
8. Once the chat window becomes full and the scrollbar active, newly incoming chat messages are no longer immediately visible. Only after an additional message arrives, or some other user activity causes a redraw, does the message become visible.

Analysis:
1. This should only happen in SDL mode due to the window caching
2. However, the underlying root cause is that Multiline_Textarea uses a very messed up approach of determining the full height of the textarea contents. It is draw() that determines the height of the text *while drawing*, and the scrollbar settings are only adjusted afterwards. The logical result is that the scrollbar becomes inconsistent with what the text field itself shows.
3. This should be fixed once richtext rendering is refactored properly to work similar to the new WordWrap object.

Tags: chat ui textarea

Related branches

Nicolai Hähnle (nha)
Changed in widelands:
status: New → Triaged
importance: Undecided → Medium
Nicolai Hähnle (nha)
Changed in widelands:
status: Triaged → In Progress
Revision history for this message
Nicolai Hähnle (nha) wrote :

Fixed in r5848.

Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Released in build16-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.