mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-23 17:17:38 +00:00
gui_session: distinguish view-stacking operations
This patch eliminates the use of invalid view handles as special Session::Command arguments. The TO_FRONT and TO_BACK operations interpreted as invalid neighbor as top-most or back-most position. Those corner cases are now expressed via dedicated commands. The new stacking commands are FRONT, BACK, FRONT_OF, and BEHIND_OF. While changing the command interface, the patch removes the OP_ prefix from the opcode values. Issue #5242
This commit is contained in:
committed by
Christian Helmuth
parent
b0803eabdb
commit
f274ed549e
@ -142,7 +142,7 @@ class Pdf_view
|
||||
|
||||
using Command = Gui::Session::Command;
|
||||
_gui.enqueue<Command::Geometry>(_view, Gui::Rect(Gui::Point(), _nit_mode.area));
|
||||
_gui.enqueue<Command::To_front>(_view, Gui::Session::View_handle());
|
||||
_gui.enqueue<Command::Front>(_view);
|
||||
_gui.execute();
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ class Viewer
|
||||
using namespace Gui;
|
||||
|
||||
_gui.enqueue<Command::Geometry>(_view, Gui::Rect(Gui::Point(0, 0), _mode.area));
|
||||
_gui.enqueue<Command::To_front>(_view, Gui::Session::View_handle());
|
||||
_gui.enqueue<Command::Front>(_view);
|
||||
_gui.enqueue<Command::Title>(_view, "webcam");
|
||||
_gui.execute();
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ void QGenodeViewWidget::paintEvent(QPaintEvent *event)
|
||||
Gui::Session::View_handle const neighbor_handle =
|
||||
gui->view_handle(platform_window->view_cap());
|
||||
|
||||
gui->enqueue<Command::To_front>(view_handle, neighbor_handle);
|
||||
gui->enqueue<Command::Front_of>(view_handle, neighbor_handle);
|
||||
gui->execute();
|
||||
|
||||
gui->release_view_handle(neighbor_handle);
|
||||
|
@ -69,7 +69,7 @@ struct Window : Genode_egl_window
|
||||
mode_change();
|
||||
|
||||
gui.enqueue<Command::Title>(view, "eglut");
|
||||
gui.enqueue<Command::To_front>(view, View_handle());
|
||||
gui.enqueue<Command::Front>(view);
|
||||
gui.execute();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user