river: remove Seat.input_manager

This is no longer needed as server is global.
This commit is contained in:
Isaac Freund
2021-05-13 15:13:17 +02:00
parent 50cdcf3ee4
commit c8b1017923
6 changed files with 15 additions and 13 deletions

View File

@ -156,7 +156,7 @@ fn getView(seat: *Seat) ?*View {
if (view.pending.fullscreen) return null;
// Do not touch views which are the target of a cursor action
if (seat.input_manager.isCursorActionTarget(view)) return null;
if (server.input_manager.isCursorActionTarget(view)) return null;
return view;
}

View File

@ -17,6 +17,8 @@
const std = @import("std");
const server = &@import("../main.zig").server;
const Error = @import("../command.zig").Error;
const Seat = @import("../Seat.zig");
@ -43,7 +45,7 @@ pub fn toggleFloat(
if (view.pending.fullscreen) return;
// Don't modify views which are the target of a cursor action
if (seat.input_manager.isCursorActionTarget(view)) return;
if (server.input_manager.isCursorActionTarget(view)) return;
view.pending.float = !view.pending.float;
view.applyPending();

View File

@ -17,6 +17,8 @@
const std = @import("std");
const server = &@import("../main.zig").server;
const Box = @import("../Box.zig");
const Error = @import("../command.zig").Error;
const Seat = @import("../Seat.zig");
@ -34,7 +36,7 @@ pub fn toggleFullscreen(
const view = seat.focused.view;
// Don't modify views which are the target of a cursor action
if (seat.input_manager.isCursorActionTarget(view)) return;
if (server.input_manager.isCursorActionTarget(view)) return;
view.pending.fullscreen = !view.pending.fullscreen;
view.applyPending();