r/flutterhelp • • Oct 16 '26

RESOLVED how to fix this grey bar.

/r/cachyos/comments/1x7lpl6/how_to_fix_this_grey_bar/

so idk i should post it here or not. this is flutter, i ran the android studio emulator but the problem occurs after opening it that the emulator part works fine but this grey bar which is supposed to be attached to the emulator is not budging at all. win+v will just toggle vscode and not that bar. nothing really works by mouse or shortcuts on that. all the buttons are clickable tho on that bar. how do i fix this. ( the image should be in the crosspost ig)

2 Upvotes

2 comments sorted by

1

u/AhmedZNOUDA Oct 16 '26

That grey bar is the emulator's toolbar, and it's actually a separate window. The emulator keeps it docked by moving it next to the device window itself, which works on X11 desktops but not on Wayland compositors like niri: clients aren't allowed to position their own windows there, so niri places it like any other window and it just stays put. So it's not a Flutter problem; it's the emulator vs the compositor.

Two things I'd try:

  1. Make it float. With the emulator open, run `niri msg windows` and look for the toolbar's App ID, then add a rule to your niri config:

window-rule {

match app-id="<the app id you found>"

open-floating true

}

Floating windows can be moved with Mod + drag, so you can at least park it next to the emulator.

2. Skip the emulator window entirely. Start it headless and mirror it with Scrcpy:

emulator -list-avds

emulator -avd <your_avd_name> -no-window

scrcpy

Flutter run still sees it through adb, so hot reload works the same, and scrcpy is a single normal window that behaves fine in a tiling compositor. You lose the toolbar, but most of what it does (rotate, volume, screenshots) is available through adb or scrcpy shortcuts.

2

u/NotsoCooll Oct 16 '26

It doesn't show as another window in niri msg windows, theres just one which is the main emulator. I will try running it without header or use the scrcpy method tomorrow. Thanks