x11: Implement various window functions (#12070)
This (mostly) allows the CSD added in https://github.com/zed-industries/zed/pull/11525 to work in X11. It's still a bit buggy as it detects a second window drag right after the first one finishes, but it's probably better to change the way window drags are detected in the title bar itself (as that causes other issues). The CSD can be tested by changing the return value of `should_render_window_controls` to true. Also fixes F11 crashing. Release Notes: - N/A
This commit is contained in:
parent
c0259a448d
commit
d8605c8614
4 changed files with 195 additions and 35 deletions
|
@ -1147,12 +1147,12 @@ impl<'a> WindowContext<'a> {
|
|||
self.window.platform_window.zoom();
|
||||
}
|
||||
|
||||
/// Opens the native title bar context menu, useful when implementing client side decorations (Wayland only)
|
||||
/// Opens the native title bar context menu, useful when implementing client side decorations (Wayland and X11)
|
||||
pub fn show_window_menu(&self, position: Point<Pixels>) {
|
||||
self.window.platform_window.show_window_menu(position)
|
||||
}
|
||||
|
||||
/// Tells the compositor to take control of window movement (Wayland only)
|
||||
/// Tells the compositor to take control of window movement (Wayland and X11)
|
||||
///
|
||||
/// Events may not be received during a move operation.
|
||||
pub fn start_system_move(&self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue