Update of bug #19666 (project wesnoth):

                Priority:              5 - Normal => 6                      
             Assigned to:                    None => mordante               
                 Release:              1.11.0-svn => 1.10.x, 1.11.0-svn     

    _______________________________________________________

Follow-up Comment #2:

It appears this bug only occurs when a GUI2 dialog (Objectives, characters
speaking, the editor's Set Starting Position tool dialog) is open while
running the themable UI (i.e. in-game or in the editor) and resizing the
window/changing resolution.

I suspect theme buttons (which are GUI1 widgets) must have a chance to receive
one or more events after creation in order to be drawn. It should be noted
that due to the theme UI design, buttons are seemingly recreated by the
display::create_buttons() method (called from display::redraw_everything(), in
turn called from an overload of preferences::set_resolution()) every time the
window is resized.

Since GUI2 windows appear to use a different event handling system than
everything else, this could be preventing GUI1 widgets created during a GUI2
window's event handler from being created successfully. The event handler in
question is twindow::signal_handler_sdl_video_resize()
(src/gui/widgets/window.cpp).

Adding the following line at the end of the aforementioned event handler made
theme buttons be drawn once after resizing during the Ojbectives dialog, but
that's all they do; they aren't redrawn again on mouse-over, and don't receive
click events at all, which makes me suspect they cease to exist immediately
after creation.


events::raise_draw_event();


I suspect mordante knows better about event handling in general than most
other active people, and he certainly knows all about GUI2 event handling in
particular; therefore, I'm assigning this bug to him. It should be noted that
this is a quite important usability issue when playing in windowed mode.

Finally, GUI1 dialogs are generally unable to handle window resize events at
all, so e.g. resizing Wesnoth's window while the Preferences dialog is shown
won't have any visible effect; the window contents are quite ungracefully cut
off instead. This will hopefully go away once GUI1 as a whole does.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?19666>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to