x11: Fix window menu not showing (#15328)
Fixes https://github.com/zed-industries/zed/issues/15245#issuecomment-2252790889 Release Notes: - Linux: Fixed window menu not showing on X11
This commit is contained in:
parent
3a44a59f8e
commit
04e25525bf
3 changed files with 23 additions and 14 deletions
|
@ -255,7 +255,7 @@ pub enum Decorations {
|
|||
}
|
||||
|
||||
/// What window controls this platform supports
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub struct WindowControls {
|
||||
/// Whether this platform supports fullscreen
|
||||
pub fullscreen: bool,
|
||||
|
@ -267,6 +267,18 @@ pub struct WindowControls {
|
|||
pub window_menu: bool,
|
||||
}
|
||||
|
||||
impl Default for WindowControls {
|
||||
fn default() -> Self {
|
||||
// Assume that we can do anything, unless told otherwise
|
||||
Self {
|
||||
fullscreen: true,
|
||||
maximize: true,
|
||||
minimize: true,
|
||||
window_menu: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A type to describe which sides of the window are currently tiled in some way
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default)]
|
||||
pub struct Tiling {
|
||||
|
@ -355,12 +367,7 @@ pub(crate) trait PlatformWindow: HasWindowHandle + HasDisplayHandle {
|
|||
}
|
||||
fn set_app_id(&mut self, _app_id: &str) {}
|
||||
fn window_controls(&self) -> WindowControls {
|
||||
WindowControls {
|
||||
fullscreen: true,
|
||||
maximize: true,
|
||||
minimize: true,
|
||||
window_menu: false,
|
||||
}
|
||||
WindowControls::default()
|
||||
}
|
||||
fn set_client_inset(&self, _inset: Pixels) {}
|
||||
fn gpu_specs(&self) -> Option<GPUSpecs>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue