mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
floating window layouter: bring focused window to front
This commit is contained in:
parent
9aff45ae8c
commit
759b9ed1ad
@ -847,29 +847,41 @@ void Floating_window_layouter::Main::handle_input(unsigned)
|
||||
* Change window geometry unless the window is in maximized
|
||||
* state.
|
||||
*/
|
||||
if (hovered_element != Window::Element::MAXIMIZER
|
||||
&& !hovered_window_is_maximized) {
|
||||
if (hovered_element != Window::Element::MAXIMIZER) {
|
||||
|
||||
drag_state = true;
|
||||
drag_init_done = false;
|
||||
dragged_window_id = hovered_window_id;
|
||||
pointer_clicked = pointer_curr;
|
||||
pointer_last = pointer_clicked;
|
||||
if (!hovered_window_is_maximized) {
|
||||
|
||||
drag_state = true;
|
||||
drag_init_done = false;
|
||||
dragged_window_id = hovered_window_id;
|
||||
pointer_clicked = pointer_curr;
|
||||
pointer_last = pointer_clicked;
|
||||
|
||||
/*
|
||||
* If the hovered window is known at the time of the press
|
||||
* event, we can initiate the drag operation immediately.
|
||||
* Otherwise, we the initiation is deferred to the next
|
||||
* update of the hover model.
|
||||
*/
|
||||
if (hovered_window)
|
||||
initiate_window_drag(*hovered_window);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the hovered window is known at the time of the press
|
||||
* event, we can initiate the drag operation immediately.
|
||||
* Otherwise, we the initiation is deferred to the next
|
||||
* update of the hover model.
|
||||
*/
|
||||
if (hovered_window) {
|
||||
initiate_window_drag(*hovered_window);
|
||||
need_regenerate_window_layout_model = true;
|
||||
|
||||
if (focused_window_id != hovered_window_id) {
|
||||
focused_window_id = hovered_window_id;
|
||||
|
||||
/* bring focused window to front */
|
||||
if (hovered_window != windows.first()) {
|
||||
windows.remove(hovered_window);
|
||||
windows.insert(hovered_window);
|
||||
}
|
||||
|
||||
hovered_window->topped();
|
||||
|
||||
generate_focus_model();
|
||||
}
|
||||
need_regenerate_window_layout_model = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user