Skip to content

Commit

Permalink
Rolled back some focusing changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pelson committed Jul 1, 2012
1 parent 9dfd953 commit d7a4ae2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
8 changes: 0 additions & 8 deletions lib/matplotlib/backends/backend_qt4.py
Expand Up @@ -395,14 +395,6 @@ def __init__( self, canvas, num ):
self.canvas.setFocusPolicy( QtCore.Qt.StrongFocus )
self.canvas.setFocus()

if sys.platform == 'darwin':
# to make a qt window pop up on top on osx, osascript can be used
# this came from http://sourceforge.net/mailarchive/message.php?msg_id=23718545
cmd = ("""/usr/bin/osascript -e 'tell app "Finder" to set """ + \
"""frontmost of process "%s" to true'""") % \
os.path.basename(sys.executable)
os.system(cmd)

QtCore.QObject.connect( self.window, QtCore.SIGNAL( 'destroyed()' ),
self._widgetclosed )
self.window._destroying = False
Expand Down
10 changes: 1 addition & 9 deletions lib/matplotlib/backends/backend_tkagg.py
Expand Up @@ -230,15 +230,7 @@ def filter_destroy(evt):

self._master = master
self._tkcanvas.focus_set()

if sys.platform == 'darwin':
# to make a tkagg window pop up on top on osx, osascript can be used
# this came from http://sourceforge.net/mailarchive/message.php?msg_id=23718545
cmd = ("""/usr/bin/osascript -e 'tell app "Finder" to set """ + \
"""frontmost of process "%s" to true'""") % \
os.path.basename(sys.executable)
os.system(cmd)


def resize(self, event):
width, height = event.width, event.height
if self._resize_callback is not None:
Expand Down

0 comments on commit d7a4ae2

Please sign in to comment.