Login  Register

Re: glwindow on secondary monitor

Posted by Triipaxx on Dec 21, 2011; 8:48am
URL: https://forum.jogamp.org/glwindow-on-secondary-monitor-tp3593579p3603496.html

nope in windows the primary monitor is always set to the first monitor attached to the graphicscard (wich is either left or right connector... i don't know), you just can set their relation, wich means.... if you switch the monitors inside of windows you need to switch them on your desk. this windows configuration only allows the mouse to get out of the the primary monitors bounds in proper direction. so if the secondary monitor is left you can leave the primary monitor on the left side...and so on....

i can remember that there was a time, windows had different ways of multimonitor representation. or .... was it the nvidia driver? whatever.... once upon a time ( :P ) there was a way to layout the monitors in horizontal/vertical span or dual view mode.... the span modes are similar to what you call a big monitor. and the dual view mode equals 2 seperate monitors. but newer versions of nvidias driver (or windows) removed this feature. i was wondering about this yesterday.... so it looks like you're right, windows always uses big monitor setup but behaves like 2 seperate monitors.

well, it may help to be able to set negative position. so in certain situation i can react on the monitor setup to put the glwindow on the right monitor.
before i decided to use newt for my preview monitor i was using the old fashion way with a jframe and a glcanvas. the jframe takes a GraphicsConfiguration object (out of GraphicsDevice) as parameter. so the jframe decided where to be opend....primary monitor or secondary. GraphicsConfiguration has a function to get the bounds out of this device (monitor).... including x/y coodinates (positive and negative) as well as width and height.
maybe you can use this information to be able to open up the glwindow on the right monitor. the getDefaultScreenDevice() from GraphicsEnvironment returns the primary monitor object.... maybe you can use this information as well....
but, it might be a lil' bit difficult to decide wich device is correct one on higher monitor counts. but maybe it is not necessary to make the decission inside of jogl.... maybe you just need a constructor of glwindow (or native window) wich takes the  GraphicsDevice object the user whishes to use.....