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

Popup window overlaps panel [gtk2] [gtk3] #71

Closed
milos3 opened this issue May 1, 2015 · 18 comments
Closed

Popup window overlaps panel [gtk2] [gtk3] #71

milos3 opened this issue May 1, 2015 · 18 comments

Comments

@milos3
Copy link

milos3 commented May 1, 2015

It feels awkward having the popup window covering the panel. This affects both gtk2 and gtk3. I got around this by removing <property name="type">popup</property> from their xml files. Doing this does not give me any errors in the terminal for either gtk2 or gtk3.

@milos3 milos3 changed the title Popup window overlaps panel Popup window overlaps panel [gtk2] [gtk3] May 1, 2015
@hasufell
Copy link
Collaborator

hasufell commented May 1, 2015

the "popup" was introduced in order to not break things for tiling window managers
6c39f62

If popup is removed, then tiling window managers will show the window in the middle of the screen.

@hasufell
Copy link
Collaborator

hasufell commented May 1, 2015

I'll have to see if I can make it work on my tiling wm without popup.

@hasufell
Copy link
Collaborator

hasufell commented May 1, 2015

So, this is weird when I remove the popup property: only the very FIRST time I open up the popup it shows up at the mouse pointer position according to
<property name="window_position">mouse</property>
Every subsequent showing of the popup will ignore this property.

@elboulangero
Copy link
Collaborator

Yep, I agree with @milos3, the popup covering the panel is a little bit awkward. It's no big deal though, I mean, PNMixer is still usable. It just feels out of place a little bit.

@hasufell
Copy link
Collaborator

hasufell commented May 1, 2015

Also, these errors show up on subsequent clicks on the tray icon (except the first one) when the popup property is gone:

(pnmixer:12069): Gdk-CRITICAL **: gdk_device_get_window_at_position_double: assertion 'GDK_IS_DEVICE (device)' failed

So something in hide_me seems to fail without that property.

edit: Yeah, ofc it fails, because the mouse pointer isn't inside the window anymore.

@elboulangero elboulangero added this to the 0.7 milestone Aug 10, 2015
@elboulangero
Copy link
Collaborator

I bet we will improve that when GtkStatusIcon will be replaced by... something else (still mysterious to me)

@elboulangero elboulangero removed this from the 0.7 milestone Feb 8, 2016
@raveit65
Copy link

This fixes the problem for me, i can do a PR if you like it.
Tested in fedora 26 with mate-desktop

From 8bd428979716fb7852bd06acf96d5ef27e52cd68 Mon Sep 17 00:00:00 2001
From: raveit65 <[email protected]>
Date: Thu, 15 Feb 2018 15:40:17 +0100
Subject: [PATCH] popup: fix position and and change window hint

In result popup isn't on top of the panel.
Changing tye-hint makes sure that popup is always
above other windows.
---
 data/ui/popup-window-horizontal-gtk3.glade | 3 +--
 data/ui/popup-window-vertical-gtk3.glade   | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/data/ui/popup-window-horizontal-gtk3.glade b/data/ui/popup-window-horizontal-gtk3.glade
index 7e1c9c7..0cbefd9 100644
--- a/data/ui/popup-window-horizontal-gtk3.glade
+++ b/data/ui/popup-window-horizontal-gtk3.glade
@@ -9,10 +9,9 @@
   </object>
   <object class="GtkWindow" id="popup_window">
     <property name="can_focus">False</property>
-    <property name="type">popup</property>
     <property name="resizable">False</property>
     <property name="window_position">mouse</property>
-    <property name="type_hint">utility</property>
+    <property name="type_hint">dropdown-menu</property>
     <property name="skip_taskbar_hint">True</property>
     <property name="skip_pager_hint">True</property>
     <property name="decorated">False</property>
diff --git a/data/ui/popup-window-vertical-gtk3.glade b/data/ui/popup-window-vertical-gtk3.glade
index 5e77ff2..4088f32 100644
--- a/data/ui/popup-window-vertical-gtk3.glade
+++ b/data/ui/popup-window-vertical-gtk3.glade
@@ -9,10 +9,9 @@
   </object>
   <object class="GtkWindow" id="popup_window">
     <property name="can_focus">False</property>
-    <property name="type">popup</property>
     <property name="resizable">False</property>
     <property name="window_position">mouse</property>
-    <property name="type_hint">utility</property>
+    <property name="type_hint">dropdown-menu</property>
     <property name="skip_taskbar_hint">True</property>
     <property name="skip_pager_hint">True</property>
     <property name="decorated">False</property>
-- 
2.13.6

@elboulangero
Copy link
Collaborator

@milos3 any chance you could try this patch and see if it fixes the issue, as you're the one who primarily reported the problem ?

@milos3
Copy link
Author

milos3 commented Feb 18, 2018

Just tried it with xfce and while it works, there is an issue that it is positioned behind notifications, making it unusable in that area.
notification

Because of the initial reason I also tried it in a tiling window manager (i3wm) and the patch didn't work for the default panel or other panels (xfce4-panel, tint2) - window still overlaps the panel and sometimes it even positions itself at the center of the screen.

@elboulangero
Copy link
Collaborator

Wow, great review, thx ! Well, I think we won't apply this patch then :/

@hasufell
Copy link
Collaborator

I hope this is not committed downstream in fedora.

@hasufell
Copy link
Collaborator

I've skimmed through the options again and I think our choice of GtkWindowType (popup) and GdkWindowTypeHint (utility) are pretty much accurate.

I don't see a way to solve this, except by enhancing gtk+ functionality, which is out of scope. As such, I guess this is kind of "can't fix" or "won't fix".

@hasufell
Copy link
Collaborator

Suggested course of action:

  • add this issue to the list of "known bugs" in the Readme
  • close this issue and add cantfix/wontfix label

@raveit65
Copy link

Hmm, looks like it was a mistake to take over ownership in fedora for pnmixer.

  • no pulseaudio support, (unmute doesn't work)
  • this weird behaviour here.

With all this problems i have no chance to use it for MATE Desktop in fedora.
My idea to use it with pavucontrol as mixer frontend won't work.
So, I don't see any reason to spend my rare time for it.
I will make it obsolete, maybe another maintainer will jump in.......

@hasufell
Copy link
Collaborator

no pulseaudio support, (unmute doesn't work)

Exactly, as any alsa mixer has this problem.

You should be familiar with the technology stack of the packages/environment you maintain if you make choices for a wide range of users.

The lack of PulseAudio support is also clearly documented in https://github.com/nicklan/pnmixer#about

I will add a specific note about it https://github.com/nicklan/pnmixer#known-bugsglitches here too, so it's really clear to everyone that there are problems with PulseAudio.

@raveit65
Copy link

raveit65 commented Feb 20, 2018

You should be familiar with the technology stack of the packages/environment you maintain if you make choices for a wide range of users.

Exactly, it was a mistake by me to take ownership of it in fedora
I will revert this ;-)

@hasufell
Copy link
Collaborator

PNMixer works fine for Alsa systems. I don't think it should be default on Fedora MATE, but I'd say it's one of the more popular alsa mixers out there, so having a properly maintained package makes sense IMO.

@raveit65
Copy link

Fedora use pulseaudio as default since a long time for all desktops.
Believe me, it is an ugly hack to prevent pulseaudio to start in all desktops in fedora.
Only a few users in fedora, who builds their system for their own will have a benefit from an alsa-only mixer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants