vemonet / EmojiMart

🏪 Modern emoji picker popup for desktop, based on Emoji Mart, built with Tauri and Svelte
MIT License
59 stars 1 forks source link

🐞 Draw shadow under window #8

Open jrc03c opened 8 months ago

jrc03c commented 8 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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

emoji-mart-gnome

vemonet commented 7 months ago

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 commented 7 months ago

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 commented 3 months ago

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!