mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-21 06:59:44 -05:00
Merge branch 'master' into feature/data-device-selection
This commit is contained in:
commit
1dbe314937
55 changed files with 521 additions and 426 deletions
|
|
@ -306,7 +306,7 @@ struct roots_config *parse_args(int argc, char *argv[]) {
|
|||
if (result == -1) {
|
||||
wlr_log(L_DEBUG, "No config file found. Using sensible defaults.");
|
||||
config->keyboard.meta_key = WLR_MODIFIER_LOGO;
|
||||
add_binding_config(&config->bindings, "Logo+Shift+e", "exit");
|
||||
add_binding_config(&config->bindings, "Logo+Shift+E", "exit");
|
||||
add_binding_config(&config->bindings, "Ctrl+q", "close");
|
||||
add_binding_config(&config->bindings, "Alt+Tab", "next_window");
|
||||
} else if (result == -2) {
|
||||
|
|
|
|||
|
|
@ -185,8 +185,8 @@ void set_view_focus(struct roots_input *input, struct roots_desktop *desktop,
|
|||
}
|
||||
view_activate(view, true);
|
||||
// TODO: list_swap
|
||||
list_del(desktop->views, index);
|
||||
list_add(desktop->views, view);
|
||||
wlr_list_del(desktop->views, index);
|
||||
wlr_list_add(desktop->views, view);
|
||||
}
|
||||
|
||||
static void handle_cursor_motion(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ void view_destroy(struct roots_view *view) {
|
|||
for (size_t i = 0; i < desktop->views->length; ++i) {
|
||||
struct roots_view *_view = desktop->views->items[i];
|
||||
if (view == _view) {
|
||||
list_del(desktop->views, i);
|
||||
wlr_list_del(desktop->views, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -209,7 +209,7 @@ struct roots_desktop *desktop_create(struct roots_server *server,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
desktop->views = list_create();
|
||||
desktop->views = wlr_list_create();
|
||||
if (desktop->views == NULL) {
|
||||
free(desktop);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -175,9 +175,11 @@ void output_add_notify(struct wl_listener *listener, void *data) {
|
|||
wlr_log(L_DEBUG, "%s %s %"PRId32"mm x %"PRId32"mm",
|
||||
wlr_output->make, wlr_output->model,
|
||||
wlr_output->phys_width, wlr_output->phys_height);
|
||||
if (wlr_output->modes->length > 0) {
|
||||
wlr_output_set_mode(wlr_output, wlr_output->modes->items[0]);
|
||||
}
|
||||
if (wl_list_length(&wlr_output->modes) > 0) {
|
||||
struct wlr_output_mode *mode = NULL;
|
||||
mode = wl_container_of((&wlr_output->modes)->prev, mode, link);
|
||||
wlr_output_set_mode(wlr_output, mode);
|
||||
}
|
||||
|
||||
struct roots_output *output = calloc(1, sizeof(struct roots_output));
|
||||
clock_gettime(CLOCK_MONOTONIC, &output->last_frame);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,6 @@ meta-key = Logo
|
|||
# - "close" to close the current view
|
||||
# - "next_window" to cycle through windows
|
||||
[bindings]
|
||||
Logo+Shift+e = exit
|
||||
Logo+Shift+E = exit
|
||||
Logo+q = close
|
||||
Alt+Tab = next_window
|
||||
|
|
|
|||
|
|
@ -110,12 +110,12 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
|
|||
view->close = close;
|
||||
view->desktop = desktop;
|
||||
roots_surface->view = view;
|
||||
list_add(desktop->views, view);
|
||||
wlr_list_add(desktop->views, view);
|
||||
view_initialize(view);
|
||||
|
||||
if (surface->state == WLR_WL_SHELL_SURFACE_STATE_TRANSIENT) {
|
||||
// we need to map it relative to the parent
|
||||
int i = list_seq_find(desktop->views, shell_surface_compare_equals,
|
||||
int i = wlr_list_seq_find(desktop->views, shell_surface_compare_equals,
|
||||
surface->parent);
|
||||
if (i != -1) {
|
||||
struct roots_view *parent = desktop->views->items[i];
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
|
|||
view->close = close;
|
||||
view->desktop = desktop;
|
||||
roots_surface->view = view;
|
||||
list_add(desktop->views, view);
|
||||
wlr_list_add(desktop->views, view);
|
||||
|
||||
view_initialize(view);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
|
|||
view->set_position = set_position;
|
||||
view->close = close;
|
||||
roots_surface->view = view;
|
||||
list_add(desktop->views, view);
|
||||
wlr_list_add(desktop->views, view);
|
||||
|
||||
if (!surface->override_redirect) {
|
||||
view_initialize(view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue