gtk(wayland): remove redundant check

This commit is contained in:
Leah Amelia Chen
2025-05-30 14:53:35 +02:00
parent 71a1ece7e9
commit dee7c835de

View File

@@ -357,14 +357,6 @@ pub const Window = struct {
const window = self.apprt_window.window.as(gtk.Window);
const config = &self.apprt_window.config;
const anchored_edge: ?layer_shell.ShellEdge = switch (config.quick_terminal_position) {
.left => .left,
.right => .right,
.top => .top,
.bottom => .bottom,
.center => null,
};
layer_shell.setKeyboardMode(
window,
switch (config.quick_terminal_keyboard_interactivity) {
@@ -380,6 +372,14 @@ pub const Window = struct {
},
);
const anchored_edge: ?layer_shell.ShellEdge = switch (config.quick_terminal_position) {
.left => .left,
.right => .right,
.top => .top,
.bottom => .bottom,
.center => null,
};
for (std.meta.tags(layer_shell.ShellEdge)) |edge| {
if (anchored_edge) |anchored| {
if (edge == anchored) {
@@ -394,7 +394,6 @@ pub const Window = struct {
layer_shell.setAnchor(window, edge, false);
}
if (self.apprt_window.isQuickTerminal()) {
if (self.slide) |slide| slide.release();
self.slide = if (anchored_edge) |anchored| slide: {
@@ -417,7 +416,6 @@ pub const Window = struct {
break :slide slide;
} else null;
}
}
/// Update the size of the quick terminal based on monitor dimensions.
fn enteredMonitor(