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 do I add shadows to a window when its undecorated attribute was set to true? #3295

Open
Adiudiu opened this issue Jun 28, 2023 · 3 comments
Labels
question Not a bug, but question or comment undecorated window Issue with `Window(undecorated = true)` wait for reply Further information is requested window management

Comments

@Adiudiu
Copy link

Adiudiu commented Jun 28, 2023

No description provided.

@Adiudiu Adiudiu added enhancement New feature or request submitted labels Jun 28, 2023
@Adiudiu Adiudiu closed this as completed Jun 30, 2023
@Adiudiu Adiudiu reopened this Jun 30, 2023
@JetBrains JetBrains deleted a comment from TanotiCoder Jun 30, 2023
@AlexeyTsvetkov AlexeyTsvetkov added question Not a bug, but question or comment and removed enhancement New feature or request labels Jul 3, 2023
@AlexeyTsvetkov
Copy link
Collaborator

@Adiudiu please provide more context:

  • What is the expected result?
  • What is the actual result?
  • Your environment: kotlin version, compose version, jdk version, operating system name and its version?
  • Add relevant screenshots & reproduction sample if possible.

@Raphael-N
Copy link

Maybe I can add some more details since I'm facing the same issue.

Expected Result
My use case is that I would like to build a Spotlight/Alfred/Raycast style input window. These are all undecorated but have an (OS made) DropShadow on MacOS. This behaviour would be the expected result.

Actual Result
I can build an undecorated window with transparent background that behaves in a similar way but it doesn't have a shadow which is a bit unusual on MacOS.

image

Environment
I am working on Kotlin 1.9.0, compose version 1.4.3, jdk version 17.0.3.1, MacOS Ventura 13.5

Additional Info
It is actually not trivial to produce this behaviour with AppKit on MacOS. It can be achieved by leaving decorations on but then making the titlebar transparent, making the space of the titlebar space usable by the app and hiding the close, minimize and maximize buttons. With that, it looks something like this:

image

It would be great to have some more access to the detailed window behaviour in each operating system but I am not sure how and if this is achievable.

@mahozad
Copy link
Contributor

mahozad commented Aug 19, 2023

@Raphael-N I provided a solution for native shadows and animations for Windows:

Maybe it will be handy for you as well.

@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
question Not a bug, but question or comment undecorated window Issue with `Window(undecorated = true)` wait for reply Further information is requested window management
Projects
None yet
Development

No branches or pull requests

5 participants