parent
3bd45966c6
commit
33f0ac83c1
@ -29,6 +29,9 @@ Changelog
|
|||||||
|
|
||||||
- Fix a regression in 0.12.0 that broke resizing of layouts (:iss:`860`)
|
- Fix a regression in 0.12.0 that broke resizing of layouts (:iss:`860`)
|
||||||
|
|
||||||
|
- Wayland: Allow using the :option:`kitty --class` command line flag
|
||||||
|
to set the app id (:iss:`862`)
|
||||||
|
|
||||||
0.12.0 [2018-09-01]
|
0.12.0 [2018-09-01]
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|||||||
2
glfw/glfw3.h
vendored
2
glfw/glfw3.h
vendored
@ -984,6 +984,8 @@ extern "C" {
|
|||||||
|
|
||||||
#define GLFW_X11_CLASS_NAME 0x00024001
|
#define GLFW_X11_CLASS_NAME 0x00024001
|
||||||
#define GLFW_X11_INSTANCE_NAME 0x00024002
|
#define GLFW_X11_INSTANCE_NAME 0x00024002
|
||||||
|
|
||||||
|
#define GLFW_WAYLAND_APP_ID 0x00025001
|
||||||
/*! @} */
|
/*! @} */
|
||||||
|
|
||||||
#define GLFW_NO_API 0
|
#define GLFW_NO_API 0
|
||||||
|
|||||||
3
glfw/internal.h
vendored
3
glfw/internal.h
vendored
@ -282,6 +282,9 @@ struct _GLFWwndconfig
|
|||||||
char className[256];
|
char className[256];
|
||||||
char instanceName[256];
|
char instanceName[256];
|
||||||
} x11;
|
} x11;
|
||||||
|
struct {
|
||||||
|
char appId[256];
|
||||||
|
} wl;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Context configuration
|
// Context configuration
|
||||||
|
|||||||
4
glfw/window.c
vendored
4
glfw/window.c
vendored
@ -460,6 +460,10 @@ GLFWAPI void glfwWindowHintString(int hint, const char* value)
|
|||||||
strncpy(_glfw.hints.window.x11.instanceName, value,
|
strncpy(_glfw.hints.window.x11.instanceName, value,
|
||||||
sizeof(_glfw.hints.window.x11.instanceName) - 1);
|
sizeof(_glfw.hints.window.x11.instanceName) - 1);
|
||||||
return;
|
return;
|
||||||
|
case GLFW_WAYLAND_APP_ID:
|
||||||
|
strncpy(_glfw.hints.window.wl.appId, value,
|
||||||
|
sizeof(_glfw.hints.window.wl.appId) - 1);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint string 0x%08X", hint);
|
_glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint string 0x%08X", hint);
|
||||||
|
|||||||
1
glfw/wl_platform.h
vendored
1
glfw/wl_platform.h
vendored
@ -149,6 +149,7 @@ typedef struct _GLFWwindowWayland
|
|||||||
double cursorPosX, cursorPosY;
|
double cursorPosX, cursorPosY;
|
||||||
|
|
||||||
char* title;
|
char* title;
|
||||||
|
char appId[256];
|
||||||
|
|
||||||
// We need to track the monitors the window spans on to calculate the
|
// We need to track the monitors the window spans on to calculate the
|
||||||
// optimal scaling factor.
|
// optimal scaling factor.
|
||||||
|
|||||||
3
glfw/wl_window.c
vendored
3
glfw/wl_window.c
vendored
@ -693,6 +693,8 @@ static GLFWbool createXdgSurface(_GLFWwindow* window)
|
|||||||
{
|
{
|
||||||
setIdleInhibitor(window, GLFW_FALSE);
|
setIdleInhibitor(window, GLFW_FALSE);
|
||||||
}
|
}
|
||||||
|
if (strlen(window->wl.appId))
|
||||||
|
xdg_toplevel_set_app_id(window->wl.xdg.toplevel, window->wl.appId);
|
||||||
|
|
||||||
wl_surface_commit(window->wl.surface);
|
wl_surface_commit(window->wl.surface);
|
||||||
wl_display_roundtrip(_glfw.wl.display);
|
wl_display_roundtrip(_glfw.wl.display);
|
||||||
@ -769,6 +771,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
{
|
{
|
||||||
window->wl.justCreated = GLFW_TRUE;
|
window->wl.justCreated = GLFW_TRUE;
|
||||||
window->wl.transparent = fbconfig->transparent;
|
window->wl.transparent = fbconfig->transparent;
|
||||||
|
strncpy(window->wl.appId, wndconfig->wl.appId, sizeof(window->wl.appId));
|
||||||
|
|
||||||
if (!createSurface(window, wndconfig))
|
if (!createSurface(window, wndconfig))
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|||||||
@ -464,7 +464,7 @@ def options_spec():
|
|||||||
dest=cls
|
dest=cls
|
||||||
default={appname}
|
default={appname}
|
||||||
condition=not is_macos
|
condition=not is_macos
|
||||||
Set the class part of the :italic:`WM_CLASS` window property
|
Set the class part of the :italic:`WM_CLASS` window property. On Wayland, it sets the app id.
|
||||||
|
|
||||||
|
|
||||||
--name
|
--name
|
||||||
|
|||||||
2
kitty/glfw-wrapper.h
generated
2
kitty/glfw-wrapper.h
generated
@ -745,6 +745,8 @@ typedef int (* GLFWapplicationshouldhandlereopenfun)(int);
|
|||||||
|
|
||||||
#define GLFW_X11_CLASS_NAME 0x00024001
|
#define GLFW_X11_CLASS_NAME 0x00024001
|
||||||
#define GLFW_X11_INSTANCE_NAME 0x00024002
|
#define GLFW_X11_INSTANCE_NAME 0x00024002
|
||||||
|
|
||||||
|
#define GLFW_WAYLAND_APP_ID 0x00025001
|
||||||
/*! @} */
|
/*! @} */
|
||||||
|
|
||||||
#define GLFW_NO_API 0
|
#define GLFW_NO_API 0
|
||||||
|
|||||||
@ -409,6 +409,7 @@ create_os_window(PyObject UNUSED *self, PyObject *args) {
|
|||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
glfwWindowHintString(GLFW_X11_INSTANCE_NAME, wm_class_name);
|
glfwWindowHintString(GLFW_X11_INSTANCE_NAME, wm_class_name);
|
||||||
glfwWindowHintString(GLFW_X11_CLASS_NAME, wm_class_class);
|
glfwWindowHintString(GLFW_X11_CLASS_NAME, wm_class_class);
|
||||||
|
glfwWindowHintString(GLFW_WAYLAND_APP_ID, wm_class_class);
|
||||||
if (OPT(x11_hide_window_decorations)) {
|
if (OPT(x11_hide_window_decorations)) {
|
||||||
glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);
|
glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user