pop-os / shell

Pop!_OS Shell
GNU General Public License v3.0
4.88k stars 266 forks source link

Android Studio emulator flashing #302

Open svenoaks opened 4 years ago

svenoaks commented 4 years ago

Distribution (run cat /etc/os-release): NAME="Pop!_OS" VERSION="20.04 LTS" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 20.04 LTS" VERSION_ID="20.04" HOME_URL="https://system76.com/pop" SUPPORT_URL="http://support.system76.com" BUG_REPORT_URL="https://github.com/pop-os/pop/issues" PRIVACY_POLICY_URL="https://system76.com/privacy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy pop-shell or provide the latest commit if building locally):

pop-shell: Installed: 0.1.0~1588624471~20.04~dfb378c Candidate: 0.1.0~1588624471~20.04~dfb378c Version table: *** 0.1.0~1588624471~20.04~dfb378c 1001 1001 http://ppa.launchpad.net/system76/pop/ubuntu focal/main amd64 Packages 1001 http://ppa.launchpad.net/system76/pop/ubuntu focal/main i386 Packages 100 /var/lib/dpkg/status

Issue/Bug Description:

The Android emulator window flashes repeatedly and endlessly as the tiling manager tries to position the window. It appears the emulator attempts to resize the window itself and is fighting with pop-shell.

Steps to reproduce (if you know):

Open Android Studio Start an emulator Enable Tile Windows in Pop-shell

Expected behavior:

The Android emulator appears normally and is tiled liked any other window.

Other Notes:

mmstick commented 4 years ago

What is the WM_CLASS of the emulator? If you watch the gnome-shell logs, you should see debug info from Pop Shell each time you focus a window.

svenoaks commented 4 years ago

@mmstick How do I view this log?

mmstick commented 4 years ago

Our makefile defines make listen as running

journalctl -o cat -n 0 -f "$(which gnome-shell)" | grep -v warning
svenoaks commented 4 years ago

pop-shell: [DEBUG] unblocking signals for 5,2 ../../../gobject/gsignal.c:2696: handler '78003' of instance '0x562084d386c0' is not blocked ../../../gobject/gsignal.c:2696: handler '78004' of instance '0x562084d386c0' is not blocked ../../../gobject/gsignal.c:2696: handler '78005' of instance '0x562084d386c0' is not blocked ../../../gobject/gsignal.c:2696: handler '78006' of instance '0x562084d386c0' is not blocked pop-shell: [INFO] focused Window(5,2) { name: Unknown, rect: Rect(3173,271,666,1232), wm_class: "null", monitor: 0, workspace: 0, cmdline: /home/svenoaks/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64, xid: 0x6200005, }

mmstick commented 4 years ago

Ow. They need to define a wm_class, window name, and honestly they should hint to the window manager that this window isn't tilable, or at least accept that the window manager may try to tile it.

likern commented 4 years ago

Now only flashing. But breaks tiling in other different ways. For example, if I switch to another workspace, I immediately and automatically return back to where my android emulator (and VS Code window) was. Also I've seen some artifacts on emulator and so on. And with opened emulator I can't even switch windows.

In the end if emulator is opened tiling becomes totally unusable.

BobbyByrne commented 4 years ago

Could there be a toggle setting for choosing to ignore apps with null wm_class? or some other indicator that the window is having issues with being resized?

Prn-Ice commented 4 years ago

Also having this issue.

buzzie-bee commented 4 years ago

Also having this issue. A toggle to ignore apps with a null wm_class or the ability to identify specific apps/windows which shouldn't be tiled would be great. Even a bash command to tell pop shell to not tile a specific window would work. The android studio main window also suffers some jank when loading the small square intro screen (likely because of the same issue).

KeyStarr commented 4 years ago

Also having this issue. I just want to emphasize that this makes autotile quite unusable for android dev. Which is sad, such a great feature!

Prn-Ice commented 4 years ago

This is the only reason I have it off right now.

mmstick commented 4 years ago

@buzzie-bee That feature's already supported: ~/.config/pop-shell/config.json

buzzie-bee commented 4 years ago

@mmstick Ahh nice. Tried modifying that config.json but unfortunately it's not picking up on the window name. Probably due to the issues described above. I've seen some bash scripts which let you manually set the WM_CLASS which I'll try at some point.

mmstick commented 4 years ago

Super + G can float a window after the fact if you want to detach it from the tree. They're no longer influenced by auto-tiling once they're marked as floating.