This commit is contained in:
Kovid Goyal 2024-03-24 14:07:35 +05:30
parent 333ea519ed
commit 0b6943fb5a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 3 additions and 2 deletions

1
glfw/wl_window.c vendored
View File

@ -2543,5 +2543,6 @@ GLFWAPI void glfwWaylandRedrawCSDWindowTitle(GLFWwindow *handle) {
GLFWAPI void glfwWaylandSetupLayerShellForNextWindow(GLFWLayerShellConfig c) {
if (layer_shell_config_for_next_window.output_name) free((void*)layer_shell_config_for_next_window.output_name);
layer_shell_config_for_next_window = c;
if (layer_shell_config_for_next_window.output_name && !layer_shell_config_for_next_window.output_name[0]) layer_shell_config_for_next_window.output_name = NULL;
if (layer_shell_config_for_next_window.output_name) layer_shell_config_for_next_window.output_name = strdup(layer_shell_config_for_next_window.output_name);
}

View File

@ -146,7 +146,7 @@ def initial_window_size(cell_width: int, cell_height: int, dpi_x: float, dpi_y:
def layer_shell_config(opts: PanelCLIOptions) -> LayerShellConfig:
ltype = GLFW_LAYER_SHELL_BACKGROUND if opts.edge == 'background' else GLFW_LAYER_SHELL_PANEL
edge = {'top': GLFW_EDGE_TOP, 'bottom': GLFW_EDGE_BOTTOM, 'left': GLFW_EDGE_LEFT, 'right': GLFW_EDGE_RIGHT}.get(opts.edge, GLFW_EDGE_TOP)
return LayerShellConfig(type=ltype, edge=edge, size_in_cells=max(1, opts.lines), output_name=opts.output_name or None)
return LayerShellConfig(type=ltype, edge=edge, size_in_cells=max(1, opts.lines), output_name=opts.output_name or '')
def main(sys_args: List[str]) -> None:

View File

@ -70,7 +70,7 @@ class LayerShellConfig(NamedTuple):
type: int = 0
edge: int = 0
focus_policy: int = 0
output_name: Optional[str] = None
output_name: str = ''
size_in_cells: int = 0