Menu

#225 glutInitWindowPosition with negative coordinate(s)

None
closed-fixed
nobody
None
5
2017-06-05
2015-05-19
John A
No

This problem dates back for all GLUT versions with glutInitWindowPosition; how to correctly position a window on a multi-display system (very typical these days) especially where you have a primary monitor on your desktop and a secondary (not primary) monitor to your left (aka Windows setup). The window positions on the left monitor will have negative coordinates (e.g., -1000, 100). The MAN page suggests that negative coordinates may or may not work (left to the OS). This is not a backwards compatibility thing in my mind, but an ERROR. It should just work!

I have tried this on 2.8.1 and the latest 3.0.0 and both behave the same way; calling glutInitWindowPosition(-1000,100) for example always results in the window being positioned on the main monitor instead of to the left.

Discussion

  • John A

    John A - 2015-05-19

    Attached is a simple little main.cpp that shows the problem...

     
  • John Tsiombikas

    John Tsiombikas - 2015-05-19

    I see two ways of fixing this issue without breaking backwards compatibility with GLUT.

    1) New entry points in freeglut_ext.h called glutInitWindowPositionSigned and glutPositionWindowSigned.

    2) A new glutSetOption option: GLUT_SIGNED_WINDOW_POS or something, false by default of course.

    I'm not keen to do either of those changes without first discussing it thouroughly in the freeglut-developer mailing list, so if you want to move this forward I'd suggest posting there.

     
  • John A

    John A - 2015-05-20

    Thanks John, I did as you suggested (contact the freeglut-developer mailing list).

     
    • Diederick C. Niehorster

      Hi John,

      Thanks for following up! Did you register for the mailing list first?
      Otherwise your message will be stuck in a vacuum forever. I'm asking
      as I haven't seen the message appear yet.

      Thanks,
      Dee

       

      Last edit: Diederick C. Niehorster 2015-05-21
      • John A

        John A - 2015-05-20

        Hi, no I didn’t register first because I didn’t realize one had to! I did just register; will the old email go through or do I need to resend it once the registration process completes?

         

        Last edit: Diederick C. Niehorster 2015-05-21
      • Diederick C. Niehorster

        Hi John,

        Yes, please resend.

        Thanks!
        Dee

         
  • rcmaniac25

    rcmaniac25 - 2017-06-05

    I just realized, I had done work on this and it was merged back in December of 2015. Is this ticket closed or does it not work as expected/needs more work?

     
  • John A

    John A - 2017-06-05

    Negative coordinates do work just fine! Thanks - John

     
  • Diederick C. Niehorster

    • status: open --> closed-fixed
    • Group: -->
     

Log in to post a comment.