~alan-griffiths/miral/g++-7

« back to all changes in this revision

Viewing changes to miral-shell/floating_window_manager.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths
  • Date: 2017-07-31 10:34:40 UTC
  • mfrom: (569.1.4 miral)
  • Revision ID: tarmac-20170731103440-re1gg9gkqh9ncsf6
Correct some conflation of the display and the outputs it includes.

Approved by Gerry Boland, mir-ci-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
468
468
    {
469
469
        if (auto active_window = tools.active_window())
470
470
        {
471
 
            auto active_display = tools.active_display();
 
471
            auto active_output = tools.active_output();
472
472
            auto& window_info = tools.info_for(active_window);
473
473
            WindowSpecification modifications;
474
474
 
477
477
            case KEY_LEFT:
478
478
                modifications.state() = mir_window_state_vertmaximized;
479
479
                tools.place_and_size_for_state(modifications, window_info);
480
 
                modifications.top_left() = active_display.top_left + title_bar_height;
 
480
                modifications.top_left() = active_output.top_left + title_bar_height;
481
481
                break;
482
482
 
483
483
            case KEY_RIGHT:
484
484
                modifications.state() = mir_window_state_vertmaximized;
485
485
                tools.place_and_size_for_state(modifications, window_info);
486
 
                modifications.top_left() = active_display.top_right() -
 
486
                modifications.top_left() = active_output.top_right() -
487
487
                    as_displacement({active_window.size().width, 0}) + title_bar_height;
488
488
                break;
489
489
 
491
491
                modifications.state() = mir_window_state_horizmaximized;
492
492
                tools.place_and_size_for_state(modifications, window_info);
493
493
 
494
 
                modifications.top_left() = active_display.top_left + title_bar_height;
 
494
                modifications.top_left() = active_output.top_left + title_bar_height;
495
495
                break;
496
496
 
497
497
            case KEY_DOWN:
498
498
                modifications.state() = mir_window_state_horizmaximized;
499
499
                tools.place_and_size_for_state(modifications, window_info);
500
500
 
501
 
                modifications.top_left() = active_display.bottom_right() - as_displacement(
 
501
                modifications.top_left() = active_output.bottom_right() - as_displacement(
502
502
                    modifications.size().is_set() ? modifications.size().value() : active_window.size());
503
503
                break;
504
504