Skip to content
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

How to make "Title bar window shake" work, when Window undecorated is enabled. #1472

Open
Omico opened this issue Nov 26, 2021 · 2 comments
Open
Assignees
Labels
desktop question Not a bug, but question or comment undecorated window Issue with `Window(undecorated = true)` window management

Comments

@Omico
Copy link
Contributor

Omico commented Nov 26, 2021

In Windows, we have a "Title bar window shake" feature.

image

When I use a custom title bar via WindowDraggableArea, the "Title bar window shake" feature has gone.

What should I do?

@Omico
Copy link
Contributor Author

Omico commented Nov 27, 2021

With custom title bar

fun main() = application {
    Window(
        onCloseRequest = ::exitApplication,
        title = "Demo",
        undecorated = true,
        transparent = true,
    ) {
       ...
    }
}
2021-11-27.02-07-36.mp4

With out custom title bar

fun main() = application {
    Window(
        onCloseRequest = ::exitApplication,
        title = "Demo",
    ) {
       ...
    }
}
2021-11-27.02-06-45.mp4

@mahozad
Copy link
Contributor

mahozad commented Aug 19, 2023

The below solution will probably get you in the right direction.
I think you should implement the hit test function in the CustomWindowProcessor as was implemented in the Swing (JFrame) version linked in the comment:

@igordmn igordmn added window management undecorated window Issue with `Window(undecorated = true)` labels Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop question Not a bug, but question or comment undecorated window Issue with `Window(undecorated = true)` window management
Projects
None yet
Development

No branches or pull requests

4 participants