mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 16:28:19 +02:00
GLFW API for configuring a window as a layer shell
This commit is contained in:
@@ -314,6 +314,7 @@ def generate_wrappers(glfw_header: str) -> None:
|
||||
void glfwWaylandRunWithActivationToken(GLFWwindow *handle, GLFWactivationcallback cb, void *cb_data)
|
||||
bool glfwWaylandSetTitlebarColor(GLFWwindow *handle, uint32_t color, bool use_system_color)
|
||||
void glfwWaylandRedrawCSDWindowTitle(GLFWwindow *handle)
|
||||
GLFWLayerShellConfig* glfwWaylandSetupLayerShellForNextWindow(void)
|
||||
unsigned long long glfwDBusUserNotify(const char *app_name, const char* icon, const char *summary, const char *body, \
|
||||
const char *action_text, int32_t timeout, GLFWDBusnotificationcreatedfun callback, void *data)
|
||||
void glfwDBusSetUserNotificationHandler(GLFWDBusnotificationactivatedfun handler)
|
||||
|
||||
8
glfw/glfw3.h
vendored
8
glfw/glfw3.h
vendored
@@ -1292,6 +1292,14 @@ typedef struct GLFWkeyevent
|
||||
bool fake_event_on_focus_change;
|
||||
} GLFWkeyevent;
|
||||
|
||||
typedef enum { GLFW_LAYER_SHELL_NONE, GLFW_LAYER_SHELL_BACKGROUND, GLFW_LAYER_SHELL_PANEL } GLFWLayerShellType;
|
||||
|
||||
typedef struct GLFWLayerShellConfig {
|
||||
GLFWLayerShellType type;
|
||||
const char *output_name;
|
||||
const char *edge;
|
||||
} GLFWLayerShellConfig;
|
||||
|
||||
/*! @brief The function pointer type for error callbacks.
|
||||
*
|
||||
* This is the function pointer type for error callbacks. An error callback
|
||||
|
||||
8
glfw/wl_window.c
vendored
8
glfw/wl_window.c
vendored
@@ -43,6 +43,8 @@
|
||||
|
||||
#define debug(...) if (_glfw.hints.init.debugRendering) fprintf(stderr, __VA_ARGS__);
|
||||
|
||||
static GLFWLayerShellConfig layer_shell_config_for_next_window = {0};
|
||||
|
||||
static void
|
||||
activation_token_done(void *data, struct xdg_activation_token_v1 *xdg_token, const char *token) {
|
||||
for (size_t i = 0; i < _glfw.wl.activation_requests.sz; i++) {
|
||||
@@ -2425,3 +2427,9 @@ GLFWAPI void glfwWaylandRedrawCSDWindowTitle(GLFWwindow *handle) {
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
change_csd_title(window);
|
||||
}
|
||||
|
||||
|
||||
GLFWAPI GLFWLayerShellConfig* glfwWaylandSetupLayerShellForNextWindow(void) {
|
||||
memset(&layer_shell_config_for_next_window, 0, sizeof(layer_shell_config_for_next_window));
|
||||
return &layer_shell_config_for_next_window;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user