Ignore:
Timestamp:
06/12/12 18:14:19 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Fixed the problem with the main window not being responsive to keystrokes after showing after being hidden by minimization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/gui.py

    r241 r246  
    544544        iconified = gdk.WindowState.ICONIFIED if pygobject \
    545545                    else gdk.WINDOW_STATE_ICONIFIED
    546         if self.config.hideMinimizedWindow and \
    547            (event.changed_mask&iconified)!=0 and \
    548            (event.new_window_state&iconified)!=0:
     546
     547        if (event.changed_mask&WINDOW_STATE_WITHDRAWN)!=0:
     548            if (event.new_window_state&WINDOW_STATE_WITHDRAWN)!=0:
     549                self._statusIcon.mainWindowHidden()
     550            else:
     551                self._statusIcon.mainWindowShown()
     552
     553        if self.config.hideMinimizedWindow and not pygobject and \
     554           (event.changed_mask&WINDOW_STATE_ICONIFIED)!=0 and \
     555           (event.new_window_state&WINDOW_STATE_ICONIFIED)!=0:
    549556            self.hideMainWindow(savePosition = False)
    550 
     557        elif (event.changed_mask&WINDOW_STATE_ICONIFIED)!=0 and \
     558             (event.new_window_state&WINDOW_STATE_ICONIFIED)==0:
     559            self._mainWindow.present()
     560           
    551561    def raiseCallback(self):
    552562        """Callback for the singleton handling code."""
     
    554564
    555565    def raiseMainWindow(self):
    556         """SHow the main window if invisible, and raise it."""
     566        """Show the main window if invisible, and raise it."""
    557567        if not self._mainWindow.get_visible():
    558568            self.showMainWindow()
     
    567577            self._mainWindowX = self._mainWindowY = None
    568578        self._mainWindow.hide()
    569         self._statusIcon.mainWindowHidden()
    570579        return True
    571580
     
    575584            self._mainWindow.move(self._mainWindowX, self._mainWindowY)
    576585
    577         self._mainWindow.show()
     586        if pygobject:
     587            self._mainWindow.show()
     588        else:
     589            self._mainWindow.present()
    578590        self._mainWindow.deiconify()
    579591           
    580         self._statusIcon.mainWindowShown()
    581 
    582592    def toggleMainWindow(self):
    583593        """Toggle the main window."""
Note: See TracChangeset for help on using the changeset viewer.