-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Ubuntu 20.04] WindowEvents.onMaximize is never called #965
Comments
Have you tried the new Windows API? fun main() = application {
val windowState = rememberWindowState()
Window(
onCloseRequest = ::exitApplication,
state = windowState,
) {
LaunchedEffect(windowState){
snapshotFlow { windowState.placement }
.onEach {
if (it == WindowPlacement.Maximized){
println("onMaximize")
}
}
.launchIn(this)
}
}
} |
Checked the new API, it works fine |
However I could not find any replacement for |
Unfortunately, we haven't implemented it for the new API yet (but we plan to). As a temporary workaround, you can use Swing interop:
|
Let's move requestFocus/isFocused to another issue |
If I pass
WindowEvents.onMaximize
to the mainWindow
, it is never called.I tried to minimize/maximize/restore the window, no output in the console.
Also maybe unrelated, but KDoc says about
WindowEvents.onRestore
the following:Currently on my machine it is called only when the window's state is changed from minimized to normal. It is not called when the window is de-maximized. So it seems, either the KDoc is incorrect or there is a bug.
The text was updated successfully, but these errors were encountered: