Merge lp:~alan-griffiths/miral/fix-1673038 into lp:miral

Proposed by Alan Griffiths
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 536
Merged at revision: 536
Proposed branch: lp:~alan-griffiths/miral/fix-1673038
Merge into: lp:miral
Diff against target: 33 lines (+19/-5)
1 file modified
miral-shell/decoration_provider.cpp (+19/-5)
To merge this branch: bzr merge lp:~alan-griffiths/miral/fix-1673038
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Cemil Azizoglu (community) Approve
Review via email: mp+319919@code.launchpad.net

Commit message

[miral-shell] Handle a titlebar decoration being deleted before it is fully created and painted for the first time.

To post a comment you must log in.
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

ok

review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'miral-shell/decoration_provider.cpp'
--- miral-shell/decoration_provider.cpp 2017-03-08 10:19:10 +0000
+++ miral-shell/decoration_provider.cpp 2017-03-15 12:40:13 +0000
@@ -401,11 +401,25 @@
401 });401 });
402 }402 }
403403
404 enqueue_work([this, window]404 if (data->titlebar.load())
405 {405 {
406 std::lock_guard<decltype(mutex)> lock{mutex};406 enqueue_work([this, window]
407 window_to_titlebar.erase(window);407 {
408 });408 std::lock_guard<decltype(mutex)> lock{mutex};
409 window_to_titlebar.erase(window);
410 });
411 }
412 else
413 {
414 data->on_create = [this, window](MirWindow*)
415 {
416 enqueue_work([this, window]
417 {
418 std::lock_guard<decltype(mutex)> lock{mutex};
419 window_to_titlebar.erase(window);
420 });
421 };
422 }
409 }423 }
410}424}
411425

Subscribers

People subscribed via source and target branches