On Wayland, provide option for better CSD
While most compositors provide server side decorations, the GNOME does not, and won't provide them. Also Wayland clients must render client side decorations. Winit was already drawing some decorations, however they were bad looking and provided no text rendering, so the title was missing. However this commit makes use of the SCTK external frame similar to GTK's Adwaita theme supporting text rendering and looking similar to other GTK applications. Fixes #1967.
This commit is contained in:
parent
f04fa5d54f
commit
829a140d9b
9 changed files with 118 additions and 14 deletions
|
|
@ -13,10 +13,11 @@ use sctk::reexports::protocols::unstable::pointer_constraints::v1::client::zwp_p
|
|||
use sctk::reexports::protocols::unstable::pointer_constraints::v1::client::zwp_confined_pointer_v1::ZwpConfinedPointerV1;
|
||||
|
||||
use sctk::seat::pointer::{ThemeManager, ThemedPointer};
|
||||
use sctk::window::{FallbackFrame, Window};
|
||||
use sctk::window::Window;
|
||||
|
||||
use crate::event::ModifiersState;
|
||||
use crate::platform_impl::wayland::event_loop::WinitState;
|
||||
use crate::platform_impl::wayland::window::WinitFrame;
|
||||
use crate::window::CursorIcon;
|
||||
|
||||
mod data;
|
||||
|
|
@ -156,7 +157,7 @@ impl WinitPointer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn drag_window(&self, window: &Window<FallbackFrame>) {
|
||||
pub fn drag_window(&self, window: &Window<WinitFrame>) {
|
||||
// WlPointer::setart_interactive_move() expects the last serial of *any*
|
||||
// pointer event (compare to set_cursor()).
|
||||
window.start_interactive_move(&self.seat, self.latest_serial.get());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue