GithubHelp home page GithubHelp logo

Comments (7)

woelper avatar woelper commented on June 2, 2024

Hi! Are you talking about modifying the configuration file?

Currently, only the window size is read from the configuration file, the position is ignored.

The reason for this is potential bugs/problems with changing display resolutions and external monitors. I am pretty sure that disconnecting external monitors and other resolution-related actions would lead to a condition where a position is stored that is not on the physical screen. Until I have figured out an easy and reliable way to prevent that, I have decided not to load the position. I am storing it though.

from oculante.

eugenesvk avatar eugenesvk commented on June 2, 2024

Yes, the config files. So currently there is no way to prevent the window from at least jumping around?
Curious how the multi-monitor bug manifess, you can't move a window to an illegal position, right, so do you get a single top-left pixel in the bottom-right corner if you're missing the monitor that would be logically "bottom/right" of the main one?

from oculante.

woelper avatar woelper commented on June 2, 2024

So currently there is no way to prevent the window from at least jumping around?

What do you mean by that? Is that a separate issue? When is it "jumping around"?

Curious how the multi-monitor bug manifess, you can't move a window to an illegal position, right, so do you get a single top-left pixel in the bottom-right corner if you're missing the monitor that would be logically "bottom/right" of the main one?

You have a 1920x1080 display, move the window to 3500,1500 on your secondary monitor, then close oculante, disconnect your laptop. Next time you open oculante, it will try to open off screen.

from oculante.

eugenesvk avatar eugenesvk commented on June 2, 2024

I mean that the position of the window changes every time I launch the app. I thought it was tied to the app not respecting the corner coordinates, but maybe it's a separate one

from oculante.

woelper avatar woelper commented on June 2, 2024

As far as I know I am not doing anything special for window placement - I think your window manager / operating system will do the window placement. I think winit is used under the hood, so that will handle window-related interaction with the different operating systems.

from oculante.

eugenesvk avatar eugenesvk commented on June 2, 2024

I'm launching without any window managers. Also other apps are not jumping around, but not sure if any of them uses Wininit. Tried simp (if I recall correctly, it's also egui, so also winit?) and it seems to have the same issue (only it doesn't support remembering window size which your app does.

Maybe it's due to the fact that you ignore the position and so winit does some random stuff? So maybe add an option to override the multimonitor safeguard and always read position from config (and if it's outside, let the OS force it back to whatever place)?

from oculante.

woelper avatar woelper commented on June 2, 2024

I am closing this as this seems to be a quite special use case and is very likely something that may be beyond my control (winit / egui)

from oculante.

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.