~mir-team/miral/release

« back to all changes in this revision

Viewing changes to miral/basic_window_manager.h

  • Committer: Bileto Bot
  • Date: 2017-06-21 08:34:34 UTC
  • mfrom: (360.1.1 miral-release)
  • Revision ID: ci-train-bot@canonical.com-20170621083434-e7ftkyg5qr2fzsao
* New upstream release 1.4.0 (https://launchpad.net/miral/+milestone/1.4.0)
  - ABI summary:
    . miral ABI unchanged at 2
  - Enhancements:
    . Support for passing messages to enable Drag & Drop
    . Support for client requested move
    . Port to the undeprecated Mir APIs
    . Added "--cursor-theme" option when configuring a cursor theme
    . Drop support for Mir versions before 0.26
  - Bugs fixed:

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
namespace miral
47
47
{
48
48
class WorkspacePolicy;
 
49
class WindowManagementPolicyAddendum2;
49
50
using mir::shell::SurfaceSet;
50
51
using WindowManagementPolicyBuilder =
51
52
    std::function<std::unique_ptr<miral::WindowManagementPolicy>(miral::WindowManagerTools const& tools)>;
61
62
        std::shared_ptr<mir::shell::DisplayLayout> const& display_layout,
62
63
        std::shared_ptr<mir::shell::PersistentSurfaceStore> const& persistent_surface_store,
63
64
        WindowManagementPolicyBuilder const& build);
 
65
    ~BasicWindowManager();
64
66
 
65
67
    void add_session(std::shared_ptr<mir::scene::Session> const& session) override;
66
68
 
101
103
        std::shared_ptr<mir::scene::Session> const& session,
102
104
        std::shared_ptr<mir::scene::Surface> const& surface,
103
105
        uint64_t timestamp) override;
 
106
 
 
107
    void handle_request_move(
 
108
        std::shared_ptr<mir::scene::Session> const& session,
 
109
        std::shared_ptr<mir::scene::Surface> const& surface,
 
110
        uint64_t timestamp) override;
104
111
#endif
105
112
 
106
113
    int set_surface_attribute(
161
168
    auto active_display() -> mir::geometry::Rectangle const override;
162
169
 
163
170
    void raise_tree(Window const& root) override;
 
171
    void start_drag_and_drop(WindowInfo& window_info, std::vector<uint8_t> const& handle) override;
 
172
    void end_drag_and_drop() override;
164
173
 
165
174
    void modify_window(WindowInfo& window_info, WindowSpecification const& modifications) override;
166
175
 
190
199
 
191
200
    std::unique_ptr<WindowManagementPolicy> const policy;
192
201
    WorkspacePolicy* const workspace_policy;
 
202
    WindowManagementPolicyAddendum2* const policy2;
193
203
 
194
204
    std::mutex mutex;
195
205
    SessionInfoMap app_info;
197
207
    mir::geometry::Rectangles displays;
198
208
    mir::geometry::Point cursor;
199
209
    uint64_t last_input_event_timestamp{0};
 
210
#if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0)
 
211
    MirEvent const* last_input_event{nullptr};
 
212
#endif
200
213
    miral::MRUWindowList mru_active_windows;
201
214
    using FullscreenSurfaces = std::set<Window>;
202
215
    FullscreenSurfaces fullscreen_surfaces;
213
226
    void update_event_timestamp(MirKeyboardEvent const* kev);
214
227
    void update_event_timestamp(MirPointerEvent const* pev);
215
228
    void update_event_timestamp(MirTouchEvent const* tev);
 
229
    void update_event_timestamp(MirInputEvent const* iev);
216
230
 
217
231
    auto can_activate_window_for_session(miral::Application const& session) -> bool;
218
232
    auto can_activate_window_for_session_in_workspace(