mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 03:45:24 +00:00
window layouter: omit superfluous resize request
This patch removes a superfluous resize request at the creation time of a new window, which resulted from _requested_size being initialized with zero whereas the _geometry was initialized with the actual window geometry. In some cases, this inconsistency led to the report of a new resize request for the size 0x0, which is obviously wrong. I.e., it leads clients to believe that the user has closed the window.
This commit is contained in:
parent
56d98824e3
commit
3680a79f38
@ -355,10 +355,12 @@ void Floating_window_layouter::Main::import_window_list(Xml_node window_list_xml
|
||||
unsigned long id = 0;
|
||||
node.attribute("id").value(&id);
|
||||
|
||||
Area const initial_size = area_attribute(node);
|
||||
|
||||
Window *win = lookup_window_by_id(id);
|
||||
if (!win) {
|
||||
win = new (env()->heap())
|
||||
Window(id, maximized_window_geometry, focus_history);
|
||||
Window(id, maximized_window_geometry, initial_size, focus_history);
|
||||
windows.insert(win);
|
||||
|
||||
Point initial_position(150*id % 800, 30 + (100*id % 500));
|
||||
@ -382,7 +384,7 @@ void Floating_window_layouter::Main::import_window_list(Xml_node window_list_xml
|
||||
win->position(initial_position);
|
||||
}
|
||||
|
||||
win->size(area_attribute(node));
|
||||
win->size(initial_size);
|
||||
win->title(string_attribute(node, "title", Window::Title("")));
|
||||
win->has_alpha(node.has_attribute("has_alpha")
|
||||
&& node.attribute("has_alpha").has_value("yes"));
|
||||
|
@ -179,10 +179,12 @@ class Floating_window_layouter::Window : public List<Window>::Element
|
||||
|
||||
public:
|
||||
|
||||
Window(Window_id id, Rect &maximized_geometry,
|
||||
Window(Window_id id, Rect &maximized_geometry, Area initial_size,
|
||||
Focus_history &focus_history)
|
||||
:
|
||||
_id(id), _maximized_geometry(maximized_geometry),
|
||||
_id(id),
|
||||
_requested_size(initial_size),
|
||||
_maximized_geometry(maximized_geometry),
|
||||
_focus_history_entry(focus_history, _id)
|
||||
{ }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user