Updated for wlroots 0.13.0

This commit is contained in:
Keith Bowes 2021-04-07 19:27:58 -04:00
parent 6a6966b8d6
commit 309ccd2faf
7 changed files with 200 additions and 40 deletions

View file

@ -71,7 +71,7 @@ static void keyboard_handle_key(
bool handled = false;
uint32_t modifiers = wlr_keyboard_get_modifiers(keyboard->device->keyboard);
if (event->state == WLR_KEY_PRESSED) {
if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
/* If alt is held down and this button was _pressed_, we attempt to
* process it as a compositor keybinding. */
for (int i = 0; i < nsyms; i++) {

View file

@ -10,7 +10,7 @@ bool wb_create_backend(struct wb_server* server) {
}
// create backend
server->backend = wlr_backend_autocreate(server->wl_display, NULL);
server->backend = wlr_backend_autocreate(server->wl_display);
if (server->backend == NULL) {
return false;
}

View file

@ -1,12 +1,14 @@
#include "waybox/xdg_shell.h"
void focus_view(struct wb_view *view, struct wlr_surface *surface) {
wlr_log(WLR_INFO, "%s: %s", _("Keyboard focus is now on surface"),
wlr_xdg_surface_from_wlr_surface(surface)->toplevel->app_id);
/* Note: this function only deals with keyboard focus. */
if (view == NULL) {
if (view == NULL || surface == NULL) {
return;
}
struct wlr_xdg_surface *xdg_surface = wlr_xdg_surface_from_wlr_surface(surface);
if (xdg_surface)
wlr_log(WLR_INFO, "%s: %s", _("Keyboard focus is now on surface"),
wlr_xdg_surface_from_wlr_surface(surface)->toplevel->app_id);
struct wb_server *server = view->server;
struct wlr_seat *seat = server->seat->seat;
struct wlr_surface *prev_surface = seat->keyboard_state.focused_surface;