GithubHelp home page GithubHelp logo

X11 support roadmap about glutin HOT 3 CLOSED

tomaka avatar tomaka commented on August 17, 2024
X11 support roadmap

from glutin.

Comments (3)

 avatar commented on August 17, 2024

@tomaka
I've added fullscreen support for X11 (see my branch x11_fullscreen).
A few issues are still remaining (that's why I didn't do a PR):

  • When exiting fullscreen mode, the screen doesn't switch back to its native resolution
  • To access the monitor, we need to have access to the display, which means that it can't be used with WindowBuilder, as it is currently with Windows. Thus, refactoring needs to be done on that part, but I don't have access to a windows machine at the moment, and maybe you already have an idea about how to do it properly. I've currently put some dummy values so that we can use the fullscreen.rs example.

You can also go through my code and give me any feedback, as this is the first code I write in rust.

from glutin.

tomaka avatar tomaka commented on August 17, 2024

Nice!

My initial plan was that MonitorID was some kind of "system ID" which doesn't change even if you close and restart the program (it can be an integer, a string, etc. but not a pointer).
When you call get_available_monitors or get_primary_monitor, a display is created, the monitors are retreived, and the display is closed.
Then when you create the window, the display is reopened, and fail! is called if the MonitorID can't be found in the new display.

However I don't know if that's good practice. An alternative would be to use a static storage for the Display, like glfw does.

Also, why add is_fullscreen to the WindowBuilder instead of just calling monitor.is_some()?

from glutin.

 avatar commented on August 17, 2024

Ok,
I could try to implement the first solution (create display, close it, and reopen it) and see how things go.
For is_fullscreen, I'll use monitor.is_some() instead.
I won't be able to work on it before two weeks though, as I'm on holidays.

from glutin.

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.