~brandontschaefer/+junk/miral-test

« back to all changes in this revision

Viewing changes to miral-shell/decoration_provider.cpp

  • Committer: Bileto Bot
  • Date: 2017-03-16 18:17:19 UTC
  • mfrom: (356.1.2 miral-release)
  • Revision ID: ci-train-bot@canonical.com-20170316181719-97cag89m9ny90l2r
* New upstream release 1.3.1 (https://launchpad.net/miral/+milestone/1.3.1)
  - ABI summary:
    . miral ABI unchanged at 2
  - Enhancements:
    . [libmirclientcpp] RAII wrappers for MirBlob and MirCookie
    . spelling: SetWindowManagmentPolicy => SetWindowManagementPolicy
  - Bugs fixed:
    . [miral-shell] If a surface is deleted before its decoration is painted
      miral-shell can crash, or hang on exit (LP: #1673038)
    . [miral-shell] if the specified font doesn't exist the server crashes
      (LP: #1671028)
    . [libmiral] When a dialog is hidden ensure that the active window focus
      goes to the parent. (LP: #1671072)

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
 
155
155
void Printer::printhelp(MirGraphicsRegion const& region)
156
156
{
 
157
    if (!working)
 
158
        return;
 
159
 
157
160
    static char const* const helptext[] =
158
161
        {
159
162
            "Welcome to miral-shell",
398
401
                 });
399
402
        }
400
403
 
401
 
        enqueue_work([this, window]
402
 
            {
403
 
                std::lock_guard<decltype(mutex)> lock{mutex};
404
 
                window_to_titlebar.erase(window);
405
 
            });
 
404
        if (data->titlebar.load())
 
405
        {
 
406
            enqueue_work([this, window]
 
407
                {
 
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
        }
406
423
    }
407
424
}
408
425