Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.4k stars 696 forks source link

Floorp bug sharing screen in waybar #3273

Open GustavoJCL opened 4 months ago

GustavoJCL commented 4 months ago

Hi, when i share the screen in sway using waybar, i have this error: image this is my waybar configuration { "layer": "top", "mode": "dock", "position": "top", "height": 20, }

apiraino commented 4 months ago

Can you please add a bit more detail about this issue? I am not able to get enough context from the screenshot. Thanks

GustavoJCL commented 4 months ago

yes, it happens when i share my screen in firefox or floorp, the indicator of screen sharing overlaps with waybar, I'm using sway, i don't tested it with other window manager image

apiraino commented 4 months ago

I believe this is unrelated to Waybar or even Sway, rather this is how Wayland places floating windows by default, in that case the screensharing widget of Floorp. Reminds me of the same issue when in a conference call (ex. Jitsi) using Firefox so I think the same solution could work.

If you want some level of control about where that widget is placed when you use that application, I think you can try setting that in your Sway config (see: man 5 sway), for example:

for_window [app_id="APP_ID" title="Title of the application..."] floating enable, move position 800 0;

To get the APP_ID, launch Floorp and move the mouse cursor over that widget. Then run this command:

$ swaymsg -t get_tree | jq -r '..|try select(.focused == true)'

Then reload Sway and see if the widget is now positioned somewhere else.

More references (for Firefox, but I think they also apply to your case):

GustavoJCL commented 4 months ago

I changed the /etc/enviroments file adding MOZ_ENABLE_WAYLAND=1, now it opens the window image

I executed $ swaymsg -t get_tree | jq -r '..|try select(.focused == true)' selecting this window i get this result:

{
  "id": 49,
  "type": "con",
  "orientation": "none",
  "percent": 1.0,
  "urgent": false,
  "marks": [],
  "focused": true,
  "layout": "none",
  "border": "pixel",
  "current_border_width": 1,
  "rect": {
    "x": 960,
    "y": 25,
    "width": 960,
    "height": 1055
  },
  "deco_rect": {
    "x": 0,
    "y": 0,
    "width": 0,
    "height": 0
  },
  "window_rect": {
    "x": 1,
    "y": 1,
    "width": 958,
    "height": 1053
  },
  "geometry": {
    "x": 0,
    "y": 0,
    "width": 56,
    "height": 31
  },
  "name": "Floorp — Sharing Indicator",
  "window": null,
  "nodes": [],
  "floating_nodes": [],
  "focus": [],
  "fullscreen_mode": 0,
  "sticky": false,
  "pid": 974,
  "app_id": "floorp",
  "visible": true,
  "max_render_time": 0,
  "shell": "xdg_shell",
  "inhibit_idle": true,
  "idle_inhibitors": {
    "user": "none",
    "application": "enabled"
  }
}

but the app_id seems to be "floorp", i also tried the same command with Floorp and i got the app_id "floorp" too, idk if this still work, how can i select that window?

GustavoJCL commented 4 months ago

It works, I just replaced for_window [app_id="floorp" title="Floorp — Sharing Indicator"] floating enable, move position 950 0; image but i found this problem, the window have have a black space, i tried to resize, but it seems to be minimum window size, but when i share my microphone and camera, it works fine: image

apiraino commented 4 months ago

Glad that it worked. About why Sway shows the floating window with a black area, I cannot help on that. I would probably ask the Sway folks on IRC #sway

I think this issue can be closed.

GustavoJCL commented 4 months ago

Thank you, you helped me a lot.