mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
force always on top for the video window, add a hook to fix an osx issue
This commit is contained in:
parent
b23dc8053d
commit
a12878347a
1 changed files with 4 additions and 2 deletions
|
@ -9,7 +9,7 @@ Sound support
|
||||||
__docformat__ = 'restructuredtext'
|
__docformat__ = 'restructuredtext'
|
||||||
|
|
||||||
import re, sys, threading, time, subprocess, os, signal, atexit, errno
|
import re, sys, threading, time, subprocess, os, signal, atexit, errno
|
||||||
from anki.hooks import addHook
|
from anki.hooks import addHook, runHook
|
||||||
|
|
||||||
# Shared utils
|
# Shared utils
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
@ -111,7 +111,8 @@ if sys.platform.startswith("win32"):
|
||||||
os.environ['PATH'] += ";" + dir
|
os.environ['PATH'] += ";" + dir
|
||||||
os.environ['PATH'] += ";" + dir + "\\..\\dist" # for testing
|
os.environ['PATH'] += ";" + dir + "\\..\\dist" # for testing
|
||||||
else:
|
else:
|
||||||
mplayerCmd = ["mplayer", "-really-quiet", "-slave", "-idle"]
|
mplayerCmd = ["mplayer", "-really-quiet", "-slave", "-idle",
|
||||||
|
"-ontop"]
|
||||||
|
|
||||||
mplayerQueue = []
|
mplayerQueue = []
|
||||||
mplayerManager = None
|
mplayerManager = None
|
||||||
|
@ -177,6 +178,7 @@ def queueMplayer(path):
|
||||||
mplayerQueue.append(path)
|
mplayerQueue.append(path)
|
||||||
mplayerCond.notifyAll()
|
mplayerCond.notifyAll()
|
||||||
mplayerCond.release()
|
mplayerCond.release()
|
||||||
|
runHook("soundQueued")
|
||||||
|
|
||||||
def clearMplayerQueue():
|
def clearMplayerQueue():
|
||||||
mplayerCond.acquire()
|
mplayerCond.acquire()
|
||||||
|
|
Loading…
Reference in a new issue