mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-05 09:17:57 +03:00
autodrawer: Fix drawer from being stuck open on initial fullscreen
This commit is contained in:
parent
a102edaa89
commit
fce6d4a6ea
@ -423,15 +423,19 @@ class AutoDrawer(Drawer):
|
||||
|
||||
if newover:
|
||||
def size_allocate(src, newalloc):
|
||||
req = (newalloc.width, newalloc.height)
|
||||
if req == src.size_request():
|
||||
# If over widget was just allocated it's requested size,
|
||||
# something caused it to pop up, so make sure state
|
||||
# is updated.
|
||||
#
|
||||
# Without this, switching to fullscreen keeps the toolbar
|
||||
# stuck open until mouse over
|
||||
self._update(False)
|
||||
srcreq = src.size_request()
|
||||
|
||||
if (newalloc.width != srcreq.width or
|
||||
newalloc.height != srcreq.height):
|
||||
return
|
||||
|
||||
# If over widget was just allocated its requested size,
|
||||
# something caused it to pop up, so make sure state
|
||||
# is updated.
|
||||
#
|
||||
# Without this, switching to fullscreen keeps the toolbar
|
||||
# stuck open until mouse over
|
||||
self._update(False)
|
||||
|
||||
self.eventBox.add(newover)
|
||||
self.overAllocID = newover.connect("size-allocate", size_allocate)
|
||||
|
Loading…
Reference in New Issue
Block a user