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

Floorp bug sharing screen in waybar #3273

Open
GustavoJCL opened this issue May 15, 2024 · 7 comments
Open

Floorp bug sharing screen in waybar #3273

GustavoJCL opened this issue May 15, 2024 · 7 comments
Labels
bug Something isn't working sway

Comments

@GustavoJCL
Copy link

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,
}

@github-actions github-actions bot added bug Something isn't working sway labels May 15, 2024
@apiraino
Copy link

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

@GustavoJCL
Copy link
Author

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
Copy link

apiraino commented May 18, 2024

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
Copy link
Author

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
Copy link
Author

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
Copy link

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
Copy link
Author

Thank you, you helped me a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sway
Projects
None yet
Development

No branches or pull requests

2 participants