Skip to content

Fix toggle fullscreen and minimization afterward results windows to be always maximized #1071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imrs776
Copy link

@imrs776 imrs776 commented May 28, 2025

Made a quick fix for the issue that I found, not usre if it it correct, but maybe it will be helpfull.
Closes #1070

@github-project-automation github-project-automation bot moved this to 📬 Needs triage in glazewm May 28, 2025
@akinevz0
Copy link

I've been testing the main branch and the supplied patch, and found that in the 2d12e1d commit, the behaviour exhibited by the wm is that executing the fullscreen command on the previously fullscreened and minimized window results in the window hiding instead of exiting fullscreen mode.

The supplied patch does indeed fix this issue!

Steps taken:
fullscreen, minimize, alt-tab, fullscreen.

Outcomes:
2d12e1d: window minimizes
#1071: window returns to tiling mode

Building this patch produces some warnings on my machine though:

glazewm-patch> cargo build
warning: method `has_siblings` is never used
  --> packages\wm\src\traits\common_getters.rs:63:6
   |
16 | pub trait CommonGetters {
   |           ------------- method in this trait
...
63 |   fn has_siblings(&self) -> bool {
   |      ^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: lifetime flowing from input to output with different syntax can be confusing
   --> packages\wm\src\traits\window_getters.rs:58:13
    |
58  |   fn native(&self) -> Ref<NativeWindow>;
    |             ^^^^^     ----------------- the lifetime gets resolved as `'_`
    |             |
    |             this lifetime flows to the output
    |
   ::: packages\wm\src\models\container.rs:158:37
    |
158 | #[derive(Clone, Debug, EnumAsInner, Delegate)]
    |                                     -------- in this derive macro expansion
    |
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
    = note: this warning originates in the macro `ambassador_impl_WindowGetters` which comes from the expansion of the derive macro `Delegate` (in Nightly builds, run with -Z macro-backtrace for more info)
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
    |
58  |   fn native(&self) -> Ref<'_, NativeWindow>;
    |                           +++

warning: lifetime flowing from input to output with different syntax can be confusing
   --> packages\wm\src\traits\window_getters.rs:148:17
    |
148 |       fn native(&self) -> Ref<NativeWindow> {
    |                 ^^^^^     ----------------- the lifetime gets resolved as `'_`
    |                 |
    |                 this lifetime flows to the output
    |
   ::: packages\wm\src\models\non_tiling_window.rs:133:1
    |
133 | impl_window_getters!(NonTilingWindow);
    | ------------------------------------- in this macro invocation
    |
    = note: this warning originates in the macro `impl_window_getters` (in Nightly builds, run with -Z macro-backtrace for more info)
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
    |
148 |       fn native(&self) -> Ref<'_, NativeWindow> {
    |                               +++

warning: lifetime flowing from input to output with different syntax can be confusing
   --> packages\wm\src\traits\window_getters.rs:148:17
    |
148 |       fn native(&self) -> Ref<NativeWindow> {
    |                 ^^^^^     ----------------- the lifetime gets resolved as `'_`
    |                 |
    |                 this lifetime flows to the output
    |
   ::: packages\wm\src\models\tiling_window.rs:135:1
    |
135 | impl_window_getters!(TilingWindow);
    | ---------------------------------- in this macro invocation
    |
    = note: this warning originates in the macro `impl_window_getters` (in Nightly builds, run with -Z macro-backtrace for more info)
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
    |
148 |       fn native(&self) -> Ref<'_, NativeWindow> {
    |                               +++

warning: lifetime flowing from input to output with different syntax can be confusing
  --> packages\wm\src\traits\window_getters.rs:58:13
   |
58 |   fn native(&self) -> Ref<NativeWindow>;
   |             ^^^^^     ----------------- the lifetime gets resolved as `'_`
   |             |
   |             this lifetime flows to the output
   |
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
   |
58 |   fn native(&self) -> Ref<'_, NativeWindow>;
   |                           +++

warning: `wm` (bin "glazewm") generated 5 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.19s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📬 Needs triage
Development

Successfully merging this pull request may close these issues.

[Bug] Toggle fullscreen and minimization afterward results windows to be always maximized
2 participants