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

gtk3 floating menu issue #48

Closed
ledti opened this issue Aug 12, 2013 · 17 comments
Closed

gtk3 floating menu issue #48

ledti opened this issue Aug 12, 2013 · 17 comments

Comments

@ledti
Copy link

ledti commented Aug 12, 2013

Steps to reproduce:
-> open a GTK3 application.
-> set it to floating.
-> click on a menu item.
-> menu initially appears behind application.

Tested with Evince, Transmission, and a few other GTK3 applications.

@baskerville
Copy link
Owner

I'm unable to reproduce: I followed you steps with transmission-gtk.

What's the content of your bspwmrc?

@ledti
Copy link
Author

ledti commented Aug 13, 2013

Sorry. I should have thought of that. The issue only happens when focus_follows_pointer is set to true. I can reproduce it with the following bspwmrc:

#! /bin/sh

FIRST_DESK=1
REMAINING_DESKS="$(seq 2 9) 0"
bspc desktop Desktop01 -n $FIRST_DESK
bspc monitor -a $REMAINING_DESKS

bspc config focus_follows_pointer true

sxhkd &

@ledti
Copy link
Author

ledti commented Aug 13, 2013

Actually, it seems I didn't test this enough. It has nothing to do with GTK as I can reproduce it with a floating Chromium and QTFM window as well.

It just happens that most of the GUI applications that I use are GTK3 based.

@baskerville
Copy link
Owner

I still can't reproduce.

What button bindings do you use in your sxhkdrc?

@ledti
Copy link
Author

ledti commented Aug 13, 2013

I'm using the example sxhkdrc with urxvt swapped to termite. I also tried launching with a minimal .xinitrc (just exec bspwm) but the problem still persisted.

It doesn't happen in i3, so if you're unable to reproduce it I'm curious as to what the problem could be. The only local thing that might be relevant is my use of mesa-git and the related ATI packages.

I'm not sure if it's worth debugging if it's only happening to myself, as it's almost a non-issue for me.

@baskerville
Copy link
Owner

Are you sure that your local branch is at the tip of the master branch?

@ledti
Copy link
Author

ledti commented Aug 13, 2013

Yep, I'm using bspwm-git from the AUR. Commit 650.

@sahib
Copy link

sahib commented Aug 14, 2013

I can reproduce it too. The first click on a menu will spawn the popup behind the window. Moving the cursor to the next menu item will open this one correctly though.

I'm also using basically the default configuration with this config:

bspc config split_ratio           0.52
bspc config border_width          4
bspc config window_gap            12
bspc config borderless_monocle    true
bspc config gapless_monocle       true
bspc config focus_follows_pointer true
bspc config apply_shadow_property true

My sxhkdrc is here: https://gist.github.com/sahib/4c8485b4574afaf50b00

Other things:

  • latest bspwm-git package:

    $ pacman -Qs bspwm
    local/bspwm-git 650-1

  • I'm using compton (-Cc)

  • Propietary nvidia driver (although that shouldn't matter)

I can reproduce it also with Qt and Gtk2 (e.g. gtk-demo) applications, so it seems to be a global problem.

@Stebalien
Copy link
Contributor

I can also trigger this bug (without compton) in dconf-editor and gtk{,3}-demo.

@baskerville
Copy link
Owner

I can in fact reproduce it but I have to click repeatedly on the menu item.

@baskerville
Copy link
Owner

I found the culprit: when the menu item is clicked, the focused desktop is stacked (because of bspc pointer -g focus) and since the window that represents the menu is not managed (its override redirect flag is on), the focused window might be raised after the unmanaged window.

The only solution I can think of is to avoid binding :button1 to bspc pointer -g focus.

@andornaut
Copy link

This also occurs in Steam with focus_follows_pointer false (as opposed to true).

Unfortunately, the workaround of unbinding bspc pointer -g focus from :button1 isn't practical for those who do not wish to use focus_follows_pointer true.

@baskerville
Copy link
Owner

This should hopefully be fixed by a0b9199.

@andornaut
Copy link

It's working better than before, but I can still reproduce this issue when using Steam; although it manifests slightly less frequently now.

  1. On the Steam main window, mouse/hover over the "Library" button at the top of the screen.
  2. Mouse over the menu that appears and left-click on one of the items such as "Linux Games".
  3. Repeat step 2 while alternating with different menu items (such as "Favorites").

Step (2) or (3) will fail some percentage of the time with the left-click going unregistered. I've experienced a failure rate of ~50%. Using the Enter key instead of left-click succeeds 100% of the time, though.

@baskerville
Copy link
Owner

This issue has nothing do with clicks not being registered.

You must create a separate issue.

@andornaut
Copy link

Done.
#53.

@ledti
Copy link
Author

ledti commented Sep 12, 2013

I tested the latest revision and the problem does seem to be fixed. 😄

... but while testing it, I ran across another issue with focus_follows_pointer specific to one application (nitrogen), which also might be related to andornaut's Steam problem. I opened another issue (#54) for this problem.

edit: whoops, while I was typing andornaut opened #53 which might be related to the new issue I made.

SeerLite pushed a commit to SeerLite/bspwm that referenced this issue Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants