~gerboland/miral/qt-bump-to-qtmir-529

« back to all changes in this revision

Viewing changes to miral-kiosk/kiosk_window_manager.cpp

  • Committer: Alan Griffiths
  • Date: 2016-07-25 16:39:49 UTC
  • mfrom: (230.1.11 miral1)
  • Revision ID: alan@octopull.co.uk-20160725163949-k8dzgk5xb42he8io
The event handling logic is hardly "canonical", so move it out of CanonicalWindowManagerPolicy

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include <linux/input.h>
26
26
 
27
 
#include <algorithm>
28
 
 
29
27
namespace ms = mir::scene;
30
28
using namespace miral;
31
29
 
119
117
 
120
118
        return true;
121
119
    }
 
120
    else if (action == mir_keyboard_action_down && scan_code == KEY_F4)
 
121
    {
 
122
        switch (modifiers & modifier_mask)
 
123
        {
 
124
        case mir_input_event_modifier_alt:
 
125
            if (auto const window = tools->active_window())
 
126
                window.request_client_surface_close();
 
127
 
 
128
            return true;
 
129
 
 
130
        default:
 
131
            break;
 
132
        }
 
133
    }
122
134
 
123
135
    return false;
124
136
}