mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-09 02:44:49 +00:00
linux/x11: Resize on GTK_EDGE_CONSTRAINTS atom (#13833)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
With the new window decorations resizing was _really_ laggy on my X11 machine. Before: - Click on window border (hitbox doesn't work properly, but that's another issue) - Drag and resize - 4-5s nothing happens - Window is resized After: - Click on window border - Drag and resize - Window is resized I'm still not 100% sure on why this happens on my machine and not Conrad's/Mikayla's, but seems like that GTK_EDGE_CONSTRAINTS atom is sent when resizing. The other thing that I can't explain is that we get a `ConfigureNotify` when resizing, with the right size, but maybe not often enough? Anyway, for now we'll go with this. Release Notes: - N/A
This commit is contained in:
parent
398c2f91dd
commit
c8b106245c
1 changed files with 4 additions and 1 deletions
|
@ -54,6 +54,7 @@ x11rb::atom_manager! {
|
|||
_MOTIF_WM_HINTS,
|
||||
_GTK_SHOW_WINDOW_MENU,
|
||||
_GTK_FRAME_EXTENTS,
|
||||
_GTK_EDGE_CONSTRAINTS,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -681,7 +682,9 @@ impl X11WindowStatePtr {
|
|||
|
||||
pub fn property_notify(&self, event: xproto::PropertyNotifyEvent) {
|
||||
let mut state = self.state.borrow_mut();
|
||||
if event.atom == state.atoms._NET_WM_STATE {
|
||||
if event.atom == state.atoms._NET_WM_STATE
|
||||
|| event.atom == state.atoms._GTK_EDGE_CONSTRAINTS
|
||||
{
|
||||
self.set_wm_properties(state);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue