diff options
Diffstat (limited to 'src/window')
| -rw-r--r-- | src/window/mapped.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/window/mapped.rs b/src/window/mapped.rs index 74a0ea4b..ec7c67b8 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -147,18 +147,19 @@ pub struct Mapped { /// fullscreen state, and keep the size (since it matches), resulting in no configure. /// /// So we work around this by emulating a configure-ack/commit cycle through - /// is_pending_windowed_fullscreen and uncommited_windowed_fullscreen. We ensure we send actual - /// configures in all cases through needs_configure. This can result in unnecessary configures - /// (like in the example above), but in most cases there will be a configure anyway to change - /// the Fullscreen state and/or the size. What this gives us is being able to synchronize our - /// windowed fullscreen state to the real window updates to avoid any flickering. + /// is_pending_windowed_fullscreen and uncommitted_windowed_fullscreen. We ensure we send + /// actual configures in all cases through needs_configure. This can result in unnecessary + /// configures (like in the example above), but in most cases there will be a configure + /// anyway to change the Fullscreen state and/or the size. What this gives us is being able + /// to synchronize our windowed fullscreen state to the real window updates to avoid any + /// flickering. is_pending_windowed_fullscreen: bool, /// Pending windowed fullscreen updates. /// /// These have been "sent" to the window in form of configures, but the window hadn't committed /// in response yet. - uncommited_windowed_fullscreen: Vec<(Serial, bool)>, + uncommitted_windowed_fullscreen: Vec<(Serial, bool)>, } niri_render_elements! { @@ -251,7 +252,7 @@ impl Mapped { last_interactive_resize_start: Cell::new(None), is_windowed_fullscreen: false, is_pending_windowed_fullscreen: false, - uncommited_windowed_fullscreen: Vec::new(), + uncommitted_windowed_fullscreen: Vec::new(), } } @@ -1004,12 +1005,12 @@ impl LayoutElement for Mapped { // If is_pending_windowed_fullscreen changed compared to the last value that we "sent" // to the window, store the configure serial. let last_sent_windowed_fullscreen = self - .uncommited_windowed_fullscreen + .uncommitted_windowed_fullscreen .last() .map(|(_, value)| *value) .unwrap_or(self.is_windowed_fullscreen); if last_sent_windowed_fullscreen != self.is_pending_windowed_fullscreen { - self.uncommited_windowed_fullscreen + self.uncommitted_windowed_fullscreen .push((serial, self.is_pending_windowed_fullscreen)); } } else { @@ -1157,7 +1158,7 @@ impl LayoutElement for Mapped { } }); - // Make sure we recieve a commit later to update self.is_windowed_fullscreen. + // Make sure we receive a commit later to update self.is_windowed_fullscreen. self.needs_configure = true; } @@ -1227,7 +1228,7 @@ impl LayoutElement for Mapped { } // "Commit" our "acked" pending windowed fullscreen state. - self.uncommited_windowed_fullscreen + self.uncommitted_windowed_fullscreen .retain_mut(|(serial, value)| { if commit_serial.is_no_older_than(serial) { self.is_windowed_fullscreen = *value; |
