GUI2/Window: removed restore flag and restorer surface

This commit is contained in:
Charles Dang 2017-05-31 00:24:03 +11:00
parent 4e2b34a5f2
commit ec2913ab3c
4 changed files with 4 additions and 13 deletions

View file

@ -86,7 +86,7 @@ bool modal_dialog::show(const unsigned auto_close_time)
{ // Scope the window stack
window_stack_handler push_window_stack(window_);
retval_ = window_->show(restore_, auto_close_time);
retval_ = window_->show(auto_close_time);
}
/*

View file

@ -283,9 +283,7 @@ window::window(const builder_window::window_resolution* definition)
, variables_()
, invalidate_layout_blocked_(false)
, suspend_drawing_(true)
, restore_(true)
, is_toplevel_(!is_in_dialog())
, restorer_()
, automatic_placement_(definition->automatic_placement)
, horizontal_placement_(definition->horizontal_placement)
, vertical_placement_(definition->vertical_placement)
@ -498,7 +496,7 @@ void window::show_non_modal(/*const unsigned auto_close_timeout*/)
events::pump();
}
int window::show(const bool restore, const unsigned auto_close_timeout)
int window::show(const unsigned auto_close_timeout)
{
/*
* Removes the old tip if one shown. The show_tip doesn't remove
@ -507,7 +505,6 @@ int window::show(const bool restore, const unsigned auto_close_timeout)
dialogs::tip::remove();
show_mode_ = modal;
restore_ = restore;
log_scope2(log_gui_draw, LOG_SCOPE_HEADER);

View file

@ -105,7 +105,7 @@ public:
* @returns The close code of the window, predefined
* values are listed in retval.
*/
int show(const bool restore = true, const unsigned auto_close_timeout = 0);
int show(const unsigned auto_close_timeout = 0);
/**
* Shows the window as a tooltip.
@ -475,15 +475,9 @@ private:
/** Avoid drawing the window. */
bool suspend_drawing_;
/** Whether the window should undraw the window using restorer_ */
bool restore_;
/** Whether the window has other windows behind it */
bool is_toplevel_;
/** When the window closes this surface is used to undraw the window. */
surface restorer_;
/** Do we wish to place the widget automatically? */
const bool automatic_placement_;

View file

@ -252,7 +252,7 @@ int show_dialog(lua_State* L)
lua_call(L, 0, 0);
}
int v = scoped_dialog::current->window->show(true, 0);
int v = scoped_dialog::current->window->show(0);
if (!lua_isnoneornil(L, 3)) {
lua_pushvalue(L, 3);