mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
linux: add a function to check if we're running on X11
This commit is contained in:
@ -13,6 +13,12 @@ pub fn is_display(display: ?*c.GdkDisplay) bool {
|
|||||||
) != 0;
|
) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if the app is running on X11
|
||||||
|
pub fn is_current_display_server() bool {
|
||||||
|
const display = c.gdk_display_get_default();
|
||||||
|
return is_display(display);
|
||||||
|
}
|
||||||
|
|
||||||
pub const Xkb = struct {
|
pub const Xkb = struct {
|
||||||
base_event_code: c_int,
|
base_event_code: c_int,
|
||||||
funcs: Funcs,
|
funcs: Funcs,
|
||||||
|
Reference in New Issue
Block a user