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

🐞 Draw shadow under window #8

Open
jrc03c opened this issue Oct 12, 2023 · 6 comments
Open

🐞 Draw shadow under window #8

jrc03c opened this issue Oct 12, 2023 · 6 comments

Comments

@jrc03c
Copy link

jrc03c commented Oct 12, 2023

Describe the bug

I'm not actually sure if this is a bug that needs to be reported or a feature that needs to be requested, but would it be possible to show shadows under the window? I'm using Linux Mint 21.2 w/ Cinnamon, and all other windows draw shadows except Emoji Mart. When Emoji Mart launches over top of another window that has the same background color, it's very hard to differentiate the Emoji Mart window from the other window. Here's a screenshot of what I mean:

Thank you!

Reproduction

No response

Operating System

Linux Mint 21.2 Cinnamon

Emoji Mart version

0.2.4

Additional context

No response

@vemonet
Copy link
Owner

vemonet commented Nov 22, 2023

Hi @jrc03c thanks for the notification, it's odd that only the EmojiMart window has no shadow

I checked and the lib to draw shadow around tauri app windows does not support Linux: https://github.com/tauri-apps/window-shadows

They say you "would need to go through your composer", so I guess either there is a change to make in the Cinnamon composer config, or a bug where the Cinnamon composer does not draw shadow properly for Tauri apps

I am using Gnome personally, so no idea how to configure the Cinnamon composer

@jrc03c
Copy link
Author

jrc03c commented Nov 22, 2023

Ah, okay. Well, thanks for looking into it! I don't know how to use the Cinnamon compositor either. It's interesting that it says "shadows are controlled by the compositor installed on the end-user system," but that seems not to be the case since Cinnamon draws shadows underneath all other windows but not Emoji Mart. That makes me think that either (1) it truly is a Tauri issue, or (2) maybe Cinnamon doesn't draw shadows for windows that lack a frame or something? I'm really not sure. Anyway, thanks for checking it out! Feel free to close this issue if you like. :)

@jrc03c
Copy link
Author

jrc03c commented Nov 22, 2023

Hm. Actually, I'm testing it out on Gnome right now, and it's not displaying a shadow here either...

emoji-mart-gnome

@vemonet
Copy link
Owner

vemonet commented Nov 23, 2023

Interesting, I always use it in dark mode and never noticed this lack of shadow, it must be more impactful on light mode

Maybe a quick fix could be to add a fine borderline, I'll check next time I open the project

The most probable is that it is a bug between Tauri (the framework to build the UI) and the composer or wayland "portals" or whatever they call those. And there your best bet to get it fixed will be to post an issue in the main repo: https://github.com/tauri-apps/tauri/issues/

Otherwise the big question is: do you use x11 or Wayland? If you don't know then you probably use wayland

There is a rule in the Wayland world: any display issue always comes from the composer!

It's pretty much all the time the answer you will see when you try to do something on Linux desktop UIs nowadays, because obviously it's much easier to send the fault on someone else than actually fixing it in our own systems ;)

From my experience building this software, the display libs landscape on Linux is completely broken right now, and that is really sad... Since the move from x11 to wayland for "security reason" we have been just going backward sadly.

This really don't motivate to work on more desktop stuff... Because the stack we are building on is just poorly built using the usual bad excuse of "it's for your security", but I came to Linux for freedom, power and fame, not security!!

@jrc03c
Copy link
Author

jrc03c commented Nov 29, 2023

I've been using X11 on every distro because Wayland currently breaks some of the programs I rely on for work.

For now, I've just been running Emoji Mart in dark mode, and that's good enough! Thanks!

@jrc03c
Copy link
Author

jrc03c commented Mar 26, 2024

Hey! I just took a look at the tauri-apps/window-shadows library, and they mention that:

As of tauri@v2 and recent versions of tao and winit, they all support enablind/disabling shadows so this crate is not needed.

Have you tried upgrading your app to Tauri v2 to see if that fixes the shadow problem? Thanks!

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

No branches or pull requests

2 participants