mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 10:27:24 +00:00
More work on getting layer to actually render
This commit is contained in:
parent
46db1f7b76
commit
d56fbb88e5
2 changed files with 8 additions and 1 deletions
7
glfw/wl_window.c
vendored
7
glfw/wl_window.c
vendored
|
|
@ -796,6 +796,11 @@ static void
|
|||
layer_surface_handle_configure(void* data, struct zwlr_layer_surface_v1* surface, uint32_t serial, uint32_t width, uint32_t height) {
|
||||
debug("Layer shell configure event: width: %u height: %u\n", width, height);
|
||||
_GLFWwindow* window = data;
|
||||
if (!window->wl.surface_configured_once) {
|
||||
window->swaps_disallowed = false;
|
||||
window->wl.waiting_for_swap_to_commit = true;
|
||||
window->wl.surface_configured_once = true;
|
||||
}
|
||||
GLFWvidmode m = {0};
|
||||
if (window->wl.monitorsCount) _glfwPlatformGetVideoMode(window->wl.monitors[0], &m);
|
||||
window->wl.layer_shell.config.size_callback(
|
||||
|
|
@ -806,8 +811,8 @@ layer_surface_handle_configure(void* data, struct zwlr_layer_surface_v1* surface
|
|||
_glfwInputWindowSize(window, width, height);
|
||||
window->wl.width = width; window->wl.height = height;
|
||||
resizeFramebuffer(window);
|
||||
_glfwInputWindowDamage(window);
|
||||
}
|
||||
_glfwInputWindowDamage(window);
|
||||
commit_window_surface_if_safe(window);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1076,6 +1076,7 @@ edge_spacing(GLFWEdge which) {
|
|||
static void
|
||||
calculate_layer_shell_window_size(
|
||||
GLFWwindow *window, const GLFWLayerShellConfig *config, unsigned monitor_width, unsigned monitor_height, uint32_t *width, uint32_t *height) {
|
||||
request_tick_callback();
|
||||
if (config->type == GLFW_LAYER_SHELL_BACKGROUND) {
|
||||
if (!*width) *width = monitor_width;
|
||||
if (!*height) *height = monitor_height;
|
||||
|
|
@ -1332,6 +1333,7 @@ create_os_window(PyObject UNUSED *self, PyObject *args, PyObject *kw) {
|
|||
// macOS: Show the window after it is ready
|
||||
glfwShowWindow(glfw_window);
|
||||
#endif
|
||||
w->is_damaged = true;
|
||||
return PyLong_FromUnsignedLongLong(w->id);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue