Fix window drawing when switching X11 workspaces by presenting when expose events occur (#20535)
Closes #18184 Release Notes: - Fix window drawing when switching X11 workspaces, particularly for tiling window managers such as i3wm and XMonad.
This commit is contained in:
parent
ad3171d16d
commit
aad3ed7f91
9 changed files with 40 additions and 32 deletions
|
@ -339,6 +339,11 @@ impl Tiling {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Default)]
|
||||
pub(crate) struct RequestFrameOptions {
|
||||
pub(crate) require_presentation: bool,
|
||||
}
|
||||
|
||||
pub(crate) trait PlatformWindow: HasWindowHandle + HasDisplayHandle {
|
||||
fn bounds(&self) -> Bounds<Pixels>;
|
||||
fn is_maximized(&self) -> bool;
|
||||
|
@ -367,7 +372,7 @@ pub(crate) trait PlatformWindow: HasWindowHandle + HasDisplayHandle {
|
|||
fn zoom(&self);
|
||||
fn toggle_fullscreen(&self);
|
||||
fn is_fullscreen(&self) -> bool;
|
||||
fn on_request_frame(&self, callback: Box<dyn FnMut()>);
|
||||
fn on_request_frame(&self, callback: Box<dyn FnMut(RequestFrameOptions)>);
|
||||
fn on_input(&self, callback: Box<dyn FnMut(PlatformInput) -> DispatchEventResult>);
|
||||
fn on_active_status_change(&self, callback: Box<dyn FnMut(bool)>);
|
||||
fn on_hover_status_change(&self, callback: Box<dyn FnMut(bool)>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue