-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
In Android Studio 4, top dropdown menus and context menu covers horizontally across the screen. #321
Comments
I'm wondering if it's possible to use xdotool to obtain more information about these transient windows: #!/usr/bin/env bash
pid=$(pgrep firefox) # insert pid of android studio here
ws=$(xdotool search --pid $pid)
while true; do
wstmp=$(xdotool search --pid $pid)
wsnew=$(diff <(echo "$ws") <(echo "$wstmp") | awk '/^>/ {print $2}')
echo found windows: $wsnew
for win in $wsnew; do
xprop -id $win
done
ws=$wstmp
sleep 0.5
done |
Hi your script fails because just running |
That's odd. Does that mean that Android Studio starts submenus in a different process? #!/usr/bin/env bash
search() {
xdotool search --onlyvisible '' 2>/dev/null
}
ws=$(search)
while true; do
wstmp=$(search)
wsnew=$(diff <(echo "$ws") <(echo "$wstmp") | awk '/^>/ {print $2}')
echo found windows: $wsnew
for win in $wsnew; do
xprop -id $win
done
ws=$wstmp
sleep 0.5
done It finds some false positives (such as notion's own WGroupWS), but better too many than too few... |
Awesome, I've modified your script as such: #!/usr/bin/env bash
ws=$(xdotool search --onlyvisible --class 'jetbrains-studio')
while true; do
wstmp=$(xdotool search --onlyvisible --class 'jetbrains-studio')
wsnew=$(diff <(echo "$ws") <(echo "$wstmp") | awk '/^>/ {print $2}')
echo found windows: $wsnew
for win in $wsnew; do
xprop -id $win
done
ws=$wstmp
sleep 0.5
done And I caught the following when I open a file menu or context menu.
|
Just wondering, does it work? When you opened the issue you mentioned |
You mean use kludges to fix it? I added the following: defwinprop{
class = "jetbrains-studio",
acrobatic = true,
transient_mode = "current"
}
defwinprop{
class = "sun-awt-X11-XFramePeer",
acrobatic = true,
transient_mode = "current"
}
defwinprop{
class = "sun-awt-X11-XWindowPeer",
acrobatic = true,
transient_mode = "current"
} But there has been no change. |
After inspecting the source, there is a special case for |
I can reproduce that
Interesting, the top menus don't disappear on mouse up for me. But it obviously doesn't work well.
Neat! A trick I sometimes use is to save the output of AFAIK Android Studio is based in a large part on IntelliJ IDEA, which I use a lot and mostly works fine. For IntelliJ we do have some winprops, but I just tried without them and think they might no longer be relevant. Looking at the IntelliJ IDEA menu's with xwinprop, however, they are
|
@raboof |
Ha, I didn't get that far into this thread, sorry :). I can confirm setting
I agree perhaps we should make this overridable at the kludge level... or lobby for android studio to take the same approach as IntelliJ IDEA ;). |
I have a 3 monitor setup. Setting the following in
|
FTR, |
Today I noticed my Android Studio 4's menus are all anchored to the top left. I'm assuming it's because of:
and I don't know why this has happened now instead of 2 days ago when I made the config change. That time I restarted Xorg and notion, and the menus were still taking up the whole width demonstrated in the video. Although this change is an improvement, it's still a pain. For example clicking on File anchors the menu on the top left, then selecting New anchors the sub menu somewhere to the right. See screenshot |
@raboof Just wondering, in IntelliJ, are menus Firefox "Do you want to quit?" dialog has the same type as Android Studio's dropdown menus, just to confirm that this is what a dialog is in usual terms — which indicates to me that Android Studio really seems to be off here:
For illustration, here's some other software and values their dropdown menus have:
Gimp:
GVim:
Libreoffice: my script fails to obtain information besides the window id. Oops :) Qt software: VirtualBox, quasselclient-qt5, OpenSCAD (iirc those were buggy but I can't remember details):
Ultimaker Cura (PyQt5) — menu positions here also seem off:
Seems like there is no consensus between toolkits/implementations on this issue, either, and we can't fix every single package that has a different way of rendering popups. Maybe honoring the window position these programs explicitly request through size hints is the way to go? Taking a wild guess here that we don't already, I know very little about how notion handles any of this.
|
Just checked and it's really (though indeed oddly) |
dwm seems to deal with it by always setting dialogs floating: https://git.suckless.org/dwm/file/dwm.c.html#l2015 |
So the problem came back again after messing with cfg_kludges.lua. So I don't know what combination of the following will cause what behaviour. But in any case, they are all difficult to work with:
|
Here's a video of the behaviour. https://youtu.be/TbYoW7vxvpM
3b. The top menus are not selectable because the menu disappears on mouse up.
xprop
on the menu, you can see the output ofxprop
on the main window in video.cfg_kludges.lua
the following, but has no effect:It makes Android Studio 4 unusable unfortunately.
The text was updated successfully, but these errors were encountered: