EmojiMart icon indicating copy to clipboard operation
EmojiMart copied to clipboard

🐞 Draw shadow under window

Open jrc03c opened this issue 2 years ago • 7 comments

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

jrc03c avatar Oct 12 '23 13:10 jrc03c

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

vemonet avatar Nov 22 '23 09:11 vemonet

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 avatar Nov 22 '23 14:11 jrc03c

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

emoji-mart-gnome

jrc03c avatar Nov 22 '23 14:11 jrc03c

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!!

vemonet avatar Nov 23 '23 15:11 vemonet

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 avatar Nov 29 '23 23:11 jrc03c

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!

jrc03c avatar Mar 26 '24 23:03 jrc03c

@jrc03c yes the main branch is updated to the latest v2 release candidate :) and the flatpak repo dev branch is also updated and working for tauri v2 (only tested on x11, not on wayland for now)

I did not publish it because during the v2 beta there was a few issues with the clipboard, and I would like it to be stable and decently tested before doing a new release

So I am waiting for the first official release to publish a new version (they are at the release candidate phase right now so that should be quite soon), but you can already build from source

vemonet avatar Aug 22 '24 23:08 vemonet