Panel: add a edge=none option

This commit is contained in:
Robin Carlier
2024-11-23 17:31:39 +01:00
parent 4eb8e6052f
commit ce2bcbb92d
7 changed files with 41 additions and 15 deletions

5
glfw/glfw3.h vendored
View File

@@ -1302,7 +1302,7 @@ typedef struct GLFWkeyevent
typedef enum { GLFW_LAYER_SHELL_NONE, GLFW_LAYER_SHELL_BACKGROUND, GLFW_LAYER_SHELL_PANEL, GLFW_LAYER_SHELL_TOP, GLFW_LAYER_SHELL_OVERLAY } GLFWLayerShellType;
typedef enum { GLFW_EDGE_TOP, GLFW_EDGE_BOTTOM, GLFW_EDGE_LEFT, GLFW_EDGE_RIGHT } GLFWEdge;
typedef enum { GLFW_EDGE_TOP, GLFW_EDGE_BOTTOM, GLFW_EDGE_LEFT, GLFW_EDGE_RIGHT, GLFW_EDGE_NONE } GLFWEdge;
typedef enum { GLFW_FOCUS_NOT_ALLOWED, GLFW_FOCUS_EXCLUSIVE, GLFW_FOCUS_ON_DEMAND} GLFWFocusPolicy;
@@ -1311,7 +1311,8 @@ typedef struct GLFWLayerShellConfig {
GLFWEdge edge;
char output_name[64];
GLFWFocusPolicy focus_policy;
unsigned size_in_cells;
unsigned x_size_in_cells;
unsigned y_size_in_cells;
void (*size_callback)(GLFWwindow *window, const struct GLFWLayerShellConfig *config, unsigned monitor_width, unsigned monitor_height, uint32_t *width, uint32_t *height);
} GLFWLayerShellConfig;

4
glfw/wl_window.c vendored
View File

@@ -998,6 +998,10 @@ layer_set_properties(_GLFWwindow *window) {
panel_width = window->wl.width;
exclusive_zone = window->wl.width;
break;
case GLFW_EDGE_NONE:
panel_width = window->wl.width;
panel_width = window->wl.height;
break;
}
}
#define surface window->wl.layer_shell.zwlr_layer_surface_v1