! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
titlebar buttons are not always updated properly
Status:
RESOLVED: FIXED

Comments

Description Brian J. Tarricone (not reading bugmail) 2005-04-09 08:44:50 CEST
To handle minimise-to-tray properly in xfmedia, I'm using the skip_taskbar hint
to simulate a _hide() (otherwise, the window gets hidden when you switch
workspaces, because GDK_WINDOW_STATE_ICONIFIED gets set).    

So when the user clicks on the tray icon, two things happen:
1) We call gtk_window_iconify() on the main window.
2) The main window notices the state change, and sets skip_taskbar so the window
is "hidden".
3) The taskbar notices the hint, and removes xfmedia from the taskbar.
4) Xfwm4 notices that skip_taskbar is set, and disables the "minimise" button on
the titlebar.

So assume the user clicks on the tray icon again:
1) We call gtk_window_deiconify() on the main window
2) The main window notices the state change, and unsets the skip_taskbar hint.
3) The taskbar notices, and shows xfmedia in the taskbar again.
4) However, xfwm4 does *not* put the "minimise" button back in the titlebar.  To
get the button back, I have to switch focus to another app, or switch workspaces
and back.
Comment 1 Olivier Fourdan editbugs 2005-04-10 19:22:25 CEST
hey brian, all this sounds a bit hacky, don't you think so?
Comment 2 Olivier Fourdan editbugs 2005-04-10 20:22:54 CEST
Can you test with current svn trunk?
Comment 3 Brian J. Tarricone (not reading bugmail) 2005-04-10 21:36:23 CEST
Yes, it's pretty hacky, but I can't come up with a better way to achieve the
same effect.  The old way, which involved calling gtk_widget_hide() on a window
state change, was getting triggered when the user changed workspaces, because
for some reason that action sets GDK_WINDOW_STATE_ICONIFIED.  The result there
is that, when the user switches back to the workspace xfmedia is on, the window
is gone.

(Just FYI, this is only when the user has "Minimize to Tray" selected.  If
they're just using the systray icon as usual, this hack isn't needed.)

Anyway, svn trunk works for me, though when re-showing the window, it looks like
the button is there, then quickly disappears and reappears.  It's just a minor
visual glitch; personally it doesn't matter to me.
Comment 4 Brian J. Tarricone (not reading bugmail) 2005-08-16 08:08:20 CEST
Looks like this is fixed...

Bug #898

Reported by:
Brian J. Tarricone (not reading bugmail)
Reported on: 2005-04-09
Last modified on: 2009-07-14

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Attachments

Additional information