linuxmint / hypnotix

An M3U IPTV Player
1.26k stars 168 forks source link

exit full screen from the osd using a mouse #179

Open milomak opened 3 years ago

milomak commented 3 years ago

i have a dual screen setup. so hypnotix is playing on one.

i have tried many things, but it seems there is no way i can exit fullscreen except by using the keyboard.

i would like to move my mouse to the other screen and press something to exit fullscreen.

have i somehow missed this functionality?

Axel-Erfurt commented 3 years ago

Did you try to use F or F11? You have to click once in the window to get the focus, then use F or F11

milomak commented 3 years ago

Did you try to use F or F11? You have to click once in the window to get the focus, then use F or F11

i am asking for a feature which doesn't involve pressing a key on the keyboard

Axel-Erfurt commented 3 years ago

This is not possible because mpv is embedded.

The only way is to change _def reinitmpv in hypnotix.py Then you have a separate window for mpv that you can move to the second monitor. In this window you can then use the mouse for fullscreen on / off.

    def reinit_mpv(self):
        if self.mpv != None:
            self.mpv.stop()
        options = {}
        try:
            mpv_options = self.settings.get_string("mpv-options")
            if ("=") in mpv_options:
                pairs = mpv_options.split()
                for pair in pairs:
                    key, value = pair.split("=")
                    options[key] = value
        except Exception as e:
            print("Could not parse MPV options!")
            print(e)

        options["user_agent"] = self.settings.get_string("user-agent")
        options["referrer"] = self.settings.get_string("http-referer")
        print("mpv options:", options)
        self.mpv = mpv.MPV(**options, input_default_bindings=True, 
                            input_vo_keyboard=True, osc=True)
milomak commented 2 years ago

oh well it was a nice to have rather than a critical issue

alexanderdd commented 2 years ago

IMO this is not nice to have but required for good UX.

If a user clicks on a button with the mouse to toggle full screen, there should be a way to exit full screen with the mouse.

alexanderdd commented 2 years ago

And/or how about double click to enable/disable fullscreen? Seems to be standard in other apps..

Axel-Erfurt commented 2 years ago

It's just not possible with an embedded mpv.

F and F11 are probably not enough?