Skip to content

Commit

Permalink
Fixed disabling osc via MPV options (#240) (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
DYefremov committed Oct 4, 2022
1 parent 3190333 commit d080f27
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions usr/lib/hypnotix/hypnotix.py
Original file line number Diff line number Diff line change
Expand Up @@ -1441,8 +1441,18 @@ def reinit_mpv(self):
while not self.mpv_drawing_area.get_window() and not Gtk.events_pending():
time.sleep(0.1)

self.mpv = mpv.MPV(**options, script_opts='osc-layout=box,osc-seekbarstyle=bar,osc-deadzonesize=0,osc-minmousemove=3', input_default_bindings=True, \
input_vo_keyboard=True,osc=True, ytdl=True, wid=str(self.mpv_drawing_area.get_window().get_xid()))
osc = True
if "osc" in options:
# To prevent 'multiple values for keyword argument'!
osc = options.pop("osc") != "no"

self.mpv = mpv.MPV(**options,
script_opts="osc-layout=box,osc-seekbarstyle=bar,osc-deadzonesize=0,osc-minmousemove=3",
input_default_bindings=True,
input_vo_keyboard=True,
osc=osc,
ytdl=True,
wid=str(self.mpv_drawing_area.get_window().get_xid()))

def on_mpv_drawing_area_draw(self, widget, cr):
cr.set_source_rgb(0.0, 0.0, 0.0)
Expand Down

0 comments on commit d080f27

Please sign in to comment.