aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/handlers/xdg_shell.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs
index b666d7c2..252ca0ac 100644
--- a/src/handlers/xdg_shell.rs
+++ b/src/handlers/xdg_shell.rs
@@ -211,7 +211,13 @@ impl KdeDecorationHandler for State {
delegate_kde_decoration!(State);
pub fn send_initial_configure_if_needed(toplevel: &ToplevelSurface) {
- let initial_configure_sent = with_states(toplevel.wl_surface(), |states| {
+ if !initial_configure_sent(toplevel) {
+ toplevel.send_configure();
+ }
+}
+
+fn initial_configure_sent(toplevel: &ToplevelSurface) -> bool {
+ with_states(toplevel.wl_surface(), |states| {
states
.data_map
.get::<XdgToplevelSurfaceData>()
@@ -219,11 +225,7 @@ pub fn send_initial_configure_if_needed(toplevel: &ToplevelSurface) {
.lock()
.unwrap()
.initial_configure_sent
- });
-
- if !initial_configure_sent {
- toplevel.send_configure();
- }
+ })
}
impl State {