Code Monkey home page Code Monkey logo

Comments (7)

cmdrkotori avatar cmdrkotori commented on June 14, 2024 1

In my desktop environment, video players MPV, SMPlayer, and VLC can all move the window by starting a click and drag on the video viewport, even while the left mouse button is also bound to the play/pause action. This is especially useful when all GUI elements are hidden except the viewport.

Sure.

I also have no idea whether this is possible with Wayland. I don't use Wayland because I've heard it has limitations with software which positions and sizes its own windows, and has no user-facing advantages if your desktop already renders without frame drops and tearing under Xorg, which mine does.

We explicitly force XCB instead of wayland because wayland's window management is broken by design, and sane window management is more important for me than any """"benefit"""" that wayland brings. I believe you can blame some of the sway devs for this situation. Wayland breaks these three settings:
Screenshot_20220222_082238
Screenshot_20220222_082321
Screenshot_20220222_082352
Until that is fixed, I couldn't care less about wayland.

from mpc-qt.

AlexFolland avatar AlexFolland commented on June 14, 2024 1

Yes, of course it would be a benefit for Windows users for a Windows-specific implementation of this feature to also be implemented for Windows, but that's not part of this particular feature request.

from mpc-qt.

cmdrkotori avatar cmdrkotori commented on June 14, 2024 1

I think this is possible, although I don't think Qt has an API for voluntarily entering a window drag on wayland. Or any platform for that matter. For Wayland, I'd need to access the underlying platform and do it raw, which isn't what one would call good code. For other platforms it can be done à la wheel-reinventing with cursor tracking + window move events, the usual way. I could simply not do this on wayland.

Re: the other apps you mentioned.

Smplayer forces use of xcb and will fail to run if DISPLAY is not set. So it can always fake a window move whenever it wants.

As for vlc, unsetting DISPLAY and forcing the fusion style with QT_STYLE_OVERRIDE=fusion does not allow the window to be dragged by the viewport. On Linux, it's a feature of the Breeze theme to enter window drag from window areas, not vlc. I haven't tested vlc on Windows to see if it does that there too.

mpv talks wayland natively and can enter a window drag from the viewport.

So that's the state of this. A platform-specific code path is needed for wayland, and faking a window move for everyone else.

from mpc-qt.

AlexFolland avatar AlexFolland commented on June 14, 2024

Just to clarify here, I also don't use Wayland and this feature request is not requesting implementation with or in Wayland. I agree with you.

from mpc-qt.

he3als avatar he3als commented on June 14, 2024

If implemented, I presume this would also work on Windows?

from mpc-qt.

AlexFolland avatar AlexFolland commented on June 14, 2024

The title specifies "Xorg", so if the feature request was fulfilled as written, it would not.

from mpc-qt.

he3als avatar he3als commented on June 14, 2024

Click to drag is also available on the Windows versions of the players that you mentioned, as a note

from mpc-qt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.