mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-09 04:15:52 +00:00
wm: invalidate dataspaces on model updates
If the Rom_session::update function returns false, the ROM dataspace may have been physically destructed (and core has removed all mappings). In this case, we have to omit the detach operation in the destructor of 'Attached_dataspace' to avoid detaching the same region twice.
This commit is contained in:
parent
2f5cff5347
commit
94f9e989df
@ -98,8 +98,11 @@ struct Wm::Main
|
||||
void handle_focus_update(unsigned)
|
||||
{
|
||||
try {
|
||||
if (!focus_ds.is_constructed() || focus_rom.update() == false)
|
||||
if (!focus_ds.is_constructed() || focus_rom.update() == false) {
|
||||
if (focus_ds.is_constructed())
|
||||
focus_ds->invalidate();
|
||||
focus_ds.construct(focus_rom.dataspace());
|
||||
}
|
||||
|
||||
unsigned long win_id = 0;
|
||||
|
||||
@ -125,9 +128,11 @@ struct Wm::Main
|
||||
void handle_resize_request_update(unsigned)
|
||||
{
|
||||
try {
|
||||
if (!resize_request_ds.is_constructed()
|
||||
|| resize_request_rom.update() == false)
|
||||
if (!resize_request_ds.is_constructed() || resize_request_rom.update() == false) {
|
||||
if (resize_request_ds.is_constructed())
|
||||
resize_request_ds->invalidate();
|
||||
resize_request_ds.construct(resize_request_rom.dataspace());
|
||||
}
|
||||
|
||||
char const * const node_type = "window";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user