Bug 907014 - virt-manager doesn't correctly restore its position
virt-manager doesn't correctly restore its position
Product: Fedora
Classification: Fedora
Component: xfwm4 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-02-02 11:57 EST by Corinna Vinschen
Modified: 2015-02-18 08:49 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-18 08:49:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Corinna Vinschen 2013-02-02 11:57:45 EST
Description of problem:

  This is kind of related to an older bug report #605842, but the effect
  is different these days.  I'm running XFCE4 under F18 and F17.  Either
  way, when minimizing virt-manager into the systray, after restoring
  it, it does not stick to its former position.  In fact, with each restore
  operation it slowly "wanders" up and left from it's former position. 

Version-Release number of selected component (if applicable):


Steps to Reproduce:

  I don't know if this only occurs under XFCE4, but let's assume so:

  1. Start XFCE4 desktop environment.
  2. Run virt-manager.
  3. Open "Preferences" and "enable system tray icon".
  4. Move virt-manager window to lower right corner of the workspace.
  5. Minimize into tray and maximize again.
  6. Observe how the position changes every time repeating step 5.

  Here's the output of `xwininfo | grep geometry', doing step 5 three times
  in a row:

  -geometry 550x828-3-30
  -geometry 550x828-6-53
  -geometry 550x828-9-76
Actual results:

  Window moves up and left after restoring from systray.

Expected results:

  Windows is restored at the exact position as it was before minimizing it
  into the systray.

Thanks in advance,
Comment 1 Cole Robinson 2013-05-15 15:23:11 EDT
Sorry for lack of response. This is indeed a bug and should be easy enough to fix
Comment 2 Corinna Vinschen 2013-06-06 04:27:13 EDT
Hi Cole,

thanks for your reply.  The problem is still present in the current
virt-manager-0.9.5-1 packages in F17 and F18.  Do you have any update
on this?

Comment 3 Cole Robinson 2013-06-13 15:38:56 EDT
So this bug is specific to XFCE, I can't reproduce on F19 gnome shell or kde. With some debugging inserted, this is what's happening with three hide/show cycles:

closing, saving position as (889, 284)
loading previous position of (889, 284)
idle cb: topwin is now at (890, 297)

closing, saving position as (888, 262)
loading previous position of (888, 262)
idle cb: topwin is now at (887, 240)

closing, saving position as (887, 240)
loading previous position of (887, 240)
idle cb: topwin is now at (888, 253)

We are saving the previous position correctly, but the window manager isn't abiding the request. This is using gtk_window_get_position and gtk_window_move. virt-manager code is show() and close() here:


Reassigning to xfce window manager
Comment 4 Kevin Fenzi 2013-06-13 16:07:37 EDT
If you go to settings->window manager tweaks -> placement

what do you have set for min size of windows to trigger smart placement? 
If you adjust this does the problem go away? 

Does the problem happen on a desktop with no other windows on it?
Comment 5 Corinna Vinschen 2013-06-14 04:12:39 EDT
Hi Kevin,

the effect is independent of the "smart placement" setting.  I tried
all settings from min to max with no changes in the behaviour.

I also tested this with no other Window on the desktop and the behaviour
stays the same, also independently from the "smart placement" setting,
under XFCE 4.8 as well as 4.10.

The effect is also independent of the position of the panel.  I moved it
to from the display bottom to the top, but virt-manager still changes its
position the same way on each unhiding from the tray.

Comment 6 Kevin Fenzi 2013-06-14 17:49:04 EDT
Is the application maximized or shaded?
Comment 7 Corinna Vinschen 2013-06-14 17:54:59 EDT
Hi Kevin,

neither maximized nor shaded.

Comment 8 Kevin Fenzi 2013-06-14 17:55:55 EDT
ok. Would you be willing to file this upstream at bugzilla.xfce.org or would you prefer I do so?
Comment 9 Corinna Vinschen 2013-06-17 03:55:46 EDT
Hi Kevin,

I'd prefer if you could file this upstream.  Your input as distro maintainer
will have more weight than mine.

Comment 10 Corinna Vinschen 2013-06-17 04:39:13 EDT
Oh, btw.

Are you really sure this is a bug in xfce and not in virt-manager?

I'm asking because I have other applications minimized to the
tray, namely xchat and twinkle, and both are restored from the tray
to the correct former display position.  Only virt-manager shows this
weird behaviour.

Comment 11 Cole Robinson 2013-06-17 11:25:22 EDT
(In reply to Corinna Vinschen from comment #10)
> Oh, btw.
> Are you really sure this is a bug in xfce and not in virt-manager?

I don't think anyone is sure, but as I detailed above virt-manager really isn't doing anything complex here.

I just tried to generate a simple reproducer but it seems to work fine on XFCE:

from gi.repository import Gtk

def delete_cb(*args, **kwargs):

window = Gtk.Window()
window.connect("delete-event", delete_cb)
lastpos = None

def toggle_window(*args, **kwargs):
    if window.is_visible():
        global lastpos
        lastpos = window.get_position()

systray = Gtk.StatusIcon()
systray.set_property("icon-name", "gtk-cdrom")
systray.connect("activate", toggle_window)


Maybe the xfwm devs can poke at it and provide more insight. I'm sure it will be easier for them to isolate it to xfwm, gtk, virt-manager, or something inbetween.
Comment 12 poma 2014-07-29 19:09:42 EDT
This problem can be associated not only with the 'xfwm4' but also with the 'xfce4-panel', particularly with the 'libsystray.so'.
And or perhaps with the 'virt-manager' and or 'gtk3'. :)
Also this is still present in Fedora 20, Fedora 21 and Fedora Rawhide i.e. Fedora 22.
Even with my local builds, 
- xfwm4-4.11.1-1.fc21.x86_64
- xfce4-panel-4.11.0-1.fc21.x86_64

To see it is specifically related to the "systray" - notification area where notification icons appear:
- start the "Virtual Machine Manager" i.e. 'virt-manager'
- choose Edit -> Preferences -> tab General -> General -> uncheck "Enable system tray icon"
- try several times with "Minimize" & "Unminimize".
Application window should appear in the same position. :)

Switch version at least to 21!
Comment 13 Fedora End Of Life 2015-01-09 17:03:46 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 14 Fedora End Of Life 2015-02-18 08:49:39 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.