Author: mordante
Date: Mon Aug 25 22:26:15 2008
New Revision: 28984
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28984&view=rev
Log:
Fix colour cursor lagging.
When a new widget dialog is shown the colour cursor location only got
updated if a widget was dirtied. Fixed the problem by forcing a cursor
update if no widget is dirty. The problem was spotted by suokko.
Modified:
trunk/src/gui/widgets/window.cpp
Modified: trunk/src/gui/widgets/window.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.cpp?rev=28984&r1=28983&r2=28984&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.cpp (original)
+++ trunk/src/gui/widgets/window.cpp Mon Aug 25 22:26:15 2008
@@ -22,6 +22,7 @@
#include "cursor.hpp"
#include "font.hpp"
#include "log.hpp"
+#include "preferences.hpp"
#include "titlescreen.hpp"
#include "tstring.hpp"
#include "video.hpp"
@@ -255,6 +256,16 @@
// Drawing not required?
if(!resized_ && !need_layout_ && !is_dirty()) {
+ // If we have colour cursor we're responsible for the updates
so do
+ // them otherwise the mouse move won't be visible until
something else
+ // dirties the screen.
+ if(preferences::use_colour_cursors()) {
+ surface frame_buffer = get_video_surface();
+
+ cursor::draw(frame_buffer);
+ video_.flip();
+ cursor::undraw(frame_buffer);
+ }
return;
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits