Chat window does not update properly on new message arrival
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.
Related branches
Changed in widelands: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in widelands: | |
status: | Triaged → In Progress |
Fixed in r5848.