wm: allow resize requests to 0x0

This commit is contained in:
Norman Feske 2015-09-30 16:07:32 +02:00 committed by Christian Helmuth
parent dcc4b8c313
commit 4164c9edec
1 changed files with 4 additions and 2 deletions

View File

@ -442,6 +442,7 @@ class Wm::Nitpicker::Session_component : public Rpc_object<Nitpicker::Session>,
Click_handler &_click_handler; Click_handler &_click_handler;
Signal_context_capability _mode_sigh; Signal_context_capability _mode_sigh;
Area _requested_size; Area _requested_size;
bool _resize_requested = false;
bool _has_alpha = false; bool _has_alpha = false;
/* /*
@ -790,7 +791,8 @@ class Wm::Nitpicker::Session_component : public Rpc_object<Nitpicker::Session>,
void request_resize(Area size) void request_resize(Area size)
{ {
_requested_size = size; _requested_size = size;
_resize_requested = true;
/* notify client */ /* notify client */
if (_mode_sigh.valid()) if (_mode_sigh.valid())
@ -894,7 +896,7 @@ class Wm::Nitpicker::Session_component : public Rpc_object<Nitpicker::Session>,
* While resizing the window, return requested window size as * While resizing the window, return requested window size as
* mode * mode
*/ */
if (_requested_size.valid()) if (_resize_requested)
return Framebuffer::Mode(_requested_size.w(), return Framebuffer::Mode(_requested_size.w(),
_requested_size.h(), _requested_size.h(),
real_mode.format()); real_mode.format());