Skip to content

Use "outer" positions in all window-related operations#2688

Merged
hecrj merged 2 commits intomasterfrom
fix/window-position-inconsistency
Jan 6, 2025
Merged

Use "outer" positions in all window-related operations#2688
hecrj merged 2 commits intomasterfrom
fix/window-position-inconsistency

Conversation

@hecrj
Copy link
Member

@hecrj hecrj commented Dec 6, 2024

@hecrj hecrj added bug Something isn't working shell fix labels Dec 6, 2024
@hecrj hecrj added this to the 0.14 milestone Dec 6, 2024
@hecrj hecrj force-pushed the fix/window-position-inconsistency branch from 69b4021 to 169e5fc Compare December 6, 2024 03:35
@SoulSharer
Copy link

Thanks for the fix! We also need to correct comments for window events:

core\src\window\event.rs:

  /// A window was opened.
    Opened {
        /// The position of the opened window. This is relative to the top-left corner of the desktop
        /// the window is on, including virtual desktops. Refers to window's "outer" position,
        /// or the window area, in logical pixels.
        ///
        /// **Note**: Not available in Wayland.
        position: Option<Point>,
        /// The size of the created window. This is its "inner" size, or the size of the
        /// client area, in logical pixels.
        size: Size,
    },

Now I'm also wondering whether we should provide "outer" size for Opened event.

@hecrj hecrj enabled auto-merge January 6, 2025 19:11
@hecrj hecrj force-pushed the fix/window-position-inconsistency branch from 61a64e9 to bfab1a3 Compare January 6, 2025 19:13
@hecrj hecrj merged commit e543329 into master Jan 6, 2025
30 checks passed
@hecrj hecrj deleted the fix/window-position-inconsistency branch January 6, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants