Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions libswc/drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,12 @@ drm_initialize(void)

drm.path = drmGetRenderDeviceNameFromFd(swc.drm->fd);
if (!drm.path) {
ERROR("Could not determine render node path\n");
goto error1;
WARNING("Could not determine render node path\n");
drm.path = drmGetPrimaryDeviceNameFromFd(swc.drm->fd);
if (!drm.path) {
ERROR("Could not determine primary node path\n");
goto error1;
}
}

if (!(swc.drm->context = wld_drm_create_context(swc.drm->fd))) {
Expand Down
21 changes: 12 additions & 9 deletions libswc/pointer.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ attach(struct view *view, struct wld_buffer *buffer)
if (view_set_size_from_buffer(view, buffer))
view_update_screens(view);

wl_list_for_each (screen, &swc.screens, link) {
view_attach(&screen->planes.cursor->view, buffer ? pointer->cursor.buffer : NULL);
view_update(&screen->planes.cursor->view);
}
wl_list_for_each (screen, &swc.screens, link)
if (screen->planes.cursor) {
view_attach(&screen->planes.cursor->view, buffer ? pointer->cursor.buffer : NULL);
view_update(&screen->planes.cursor->view);
}

return 0;
}
Expand All @@ -124,10 +125,11 @@ move(struct view *view, int32_t x, int32_t y)
if (view_set_position(view, x, y))
view_update_screens(view);

wl_list_for_each (screen, &swc.screens, link) {
view_move(&screen->planes.cursor->view, view->geometry.x, view->geometry.y);
view_update(&screen->planes.cursor->view);
}
wl_list_for_each (screen, &swc.screens, link)
if (screen->planes.cursor) {
view_move(&screen->planes.cursor->view, view->geometry.x, view->geometry.y);
view_update(&screen->planes.cursor->view);
}

return true;
}
Expand Down Expand Up @@ -286,7 +288,8 @@ pointer_initialize(struct pointer *pointer)
pointer_set_cursor(pointer, cursor_left_ptr);

wl_list_for_each (screen, &swc.screens, link)
view_attach(&screen->planes.cursor->view, pointer->cursor.buffer);
if (screen->planes.cursor)
view_attach(&screen->planes.cursor->view, pointer->cursor.buffer);

input_focus_initialize(&pointer->focus, &pointer->focus_handler);
pixman_region32_init(&pointer->region);
Expand Down
3 changes: 2 additions & 1 deletion libswc/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ screen_new(uint32_t crtc, struct output *output, struct plane *cursor_plane)
goto error2;
}

cursor_plane->screen = screen;
if (cursor_plane)
cursor_plane->screen = screen;
screen->planes.cursor = cursor_plane;

screen->handler = &null_handler;
Expand Down