~mir-team/mir/in-process-egl+input-conglomeration

« back to all changes in this revision

Viewing changes to src/server/graphics/gbm/gbm_display.cpp

Merged trunk and fixed issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 */
18
18
 
19
19
#include "gbm_display.h"
 
20
#include "gbm_cursor.h"
20
21
#include "gbm_platform.h"
21
22
#include "gbm_display_buffer.h"
22
23
#include "kms_display_configuration.h"
134
135
{
135
136
    try
136
137
    {
 
138
        if (cursor) cursor->hide();
137
139
        platform->drm.drop_master();
138
140
    }
139
141
    catch(std::runtime_error const& e)
148
150
    try
149
151
    {
150
152
        platform->drm.set_master();
 
153
        if (cursor) cursor->show();
151
154
    }
152
155
    catch(std::runtime_error const& e)
153
156
    {
158
161
    for (auto& db_ptr : display_buffers)
159
162
        db_ptr->schedule_set_crtc();
160
163
}
 
164
 
 
165
auto mgg::GBMDisplay::the_cursor() -> std::weak_ptr<Cursor>
 
166
{
 
167
    if (!cursor) cursor = std::make_shared<GBMCursor>(platform, output_container);
 
168
    return cursor;
 
169
}