Soliton ran into the problem that when using his touchpad to double
click on a campaign it might directly select the difficulty and dismiss
the next dialog. When using a mouse the problem didn't occur.
The output of events for the mouse were:
Push DOUBLE_CLICK_EVENT.
Process DOUBLE_CLICK_EVENT.
Window dtor.
The output of events for the touchpad were:
Push DOUBLE_CLICK_EVENT.
Window dtor.
Process DOUBLE_CLICK_EVENT.
This explains why the events are send to the next dialog. It doesn't
explain why it happens, but that might be the touchpad driver or OS.
The problem is solved by removing the extra events after closing the
dialog. Avoiding the events to be generated is tricky since a gui2
dialog can open a gui1 one, when that happens double clicks need to be
enabled temporary and then again disabled when that dialog closes.
...-lib and -test even if they got no translateable strings the
declaration is done via this define: #define GETTEXT_DOMAIN
"wesnoth-lib" a short "how to get .cpp files translated" is left in
src/gettext.hpp
The current design of twindow (and some other widget classes) have the
problem that they shouldn't be copied. The code doesn't copy the
objects as long as the compiler does a return value optimization,
which indicates a bad class design. By turning the return value into a
pointer the copying is no longer needed.