Author: mordante
Date: Sat Feb 26 10:22:25 2011
New Revision: 48647
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48647&view=rev
Log:
Implement the SDL_VIDEOEXPOSE for gui2.
YogiHH discovered the event was not implemented and it seems not to be
fired on Linux.
YogiHH please test whether there are no glitches.
Modified:
trunk/changelog
trunk/src/gui/auxiliary/event/handler.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=48647&r1=48646&r2=48647&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sat Feb 26 10:22:25 2011
@@ -28,6 +28,7 @@
skipping to the lobby with -s <server> command line.
* Add 1.25, 1.75 and 3.0 animation speed factors to display preferences
(feature request #15713).
+ * Implemented: The expose event in gui2.
* WML engine:
* Allow [color_range] and [color_palette] nodes to be inserted at top-level
by add-ons to globally define custom ranges and palettes.
Modified: trunk/src/gui/auxiliary/event/handler.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/auxiliary/event/handler.cpp?rev=48647&r1=48646&r2=48647&view=diff
==============================================================================
--- trunk/src/gui/auxiliary/event/handler.cpp (original)
+++ trunk/src/gui/auxiliary/event/handler.cpp Sat Feb 26 10:22:25 2011
@@ -159,7 +159,7 @@
/***** Handlers *****/
/** Fires a draw event. */
- void draw();
+ void draw(const bool force);
/**
* Fires a video resize event.
@@ -304,7 +304,7 @@
break;
case DRAW_EVENT:
- draw();
+ draw(false);
break;
case TIMER_EVENT:
@@ -327,6 +327,10 @@
key_down(event.key);
break;
+ case SDL_VIDEOEXPOSE:
+ draw(true);
+ break;
+
case SDL_VIDEORESIZE:
video_resize(tpoint(event.resize.w, event.resize.h));
break;
@@ -413,12 +417,17 @@
}
}
-void thandler::draw()
+void thandler::draw(const bool force)
{
// Don't display this event since it floods the screen
//DBG_GUI_E << "Firing " << DRAW << ".\n";
- bool first = true;
+ /*
+ * In normal draw mode the first window in not forced to be drawn the
+ * others are. So for forced mode we only need to force the first
window to
+ * be drawn the others are already handled.
+ */
+ bool first = !force;
/**
* @todo Need to evaluate which windows really to redraw.
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits