Skip to content

Commit d7a4ae2

Browse files
committed
Rolled back some focusing changes.
1 parent 9dfd953 commit d7a4ae2

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

lib/matplotlib/backends/backend_qt4.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -395,14 +395,6 @@ def __init__( self, canvas, num ):
395395
self.canvas.setFocusPolicy( QtCore.Qt.StrongFocus )
396396
self.canvas.setFocus()
397397

398-
if sys.platform == 'darwin':
399-
# to make a qt window pop up on top on osx, osascript can be used
400-
# this came from http://sourceforge.net/mailarchive/message.php?msg_id=23718545
401-
cmd = ("""/usr/bin/osascript -e 'tell app "Finder" to set """ + \
402-
"""frontmost of process "%s" to true'""") % \
403-
os.path.basename(sys.executable)
404-
os.system(cmd)
405-
406398
QtCore.QObject.connect( self.window, QtCore.SIGNAL( 'destroyed()' ),
407399
self._widgetclosed )
408400
self.window._destroying = False

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,7 @@ def filter_destroy(evt):
230230

231231
self._master = master
232232
self._tkcanvas.focus_set()
233-
234-
if sys.platform == 'darwin':
235-
# to make a tkagg window pop up on top on osx, osascript can be used
236-
# this came from http://sourceforge.net/mailarchive/message.php?msg_id=23718545
237-
cmd = ("""/usr/bin/osascript -e 'tell app "Finder" to set """ + \
238-
"""frontmost of process "%s" to true'""") % \
239-
os.path.basename(sys.executable)
240-
os.system(cmd)
241-
233+
242234
def resize(self, event):
243235
width, height = event.width, event.height
244236
if self._resize_callback is not None:

0 commit comments

Comments
 (0)