Menu

[r8073]: / branches / mathtex / lib / matplotlib / windowing.py  Maximize  Restore  History

Download this file

19 lines (15 with data), 454 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from matplotlib import rcParams
try:
if not rcParams['tk.window_focus']:
raise ImportError
from _windowing import GetForegroundWindow, SetForegroundWindow
except ImportError:
def GetForegroundWindow():
return 0
def SetForegroundWindow(hwnd):
pass
class FocusManager:
def __init__(self):
self._shellWindow = GetForegroundWindow()
def __del__(self):
SetForegroundWindow(self._shellWindow)