Is there a way to know (from one of the Root graphics classes), the number of screens the display has ? The kind of information you’d get using :
xdpyinfo | grep screen
I have a GUI that computes its size relative to the the display size :
UInt_t dw = gClient->GetDisplayWidth();
UInt_t dh = gClient->GetDisplayHeight();
UInt_t w = (UInt_t)(wfraction*dw);
UInt_t h = (UInt_t)(hfraction*dh);
fMainFrame = new TGMainFrame(gClient->GetRoot(),w,h);
Problem is when running on a machine with several screens (that act as a single big display), my window span several screens, which is quite annoying. I’d like to restrict it to a single screen.
We don’t have multi display support yet. In the pipeline.
I’ve not tried as I don’t have a multi display X11 setup, can you designate a preferred screen with DISPLAY=:0.1 :0.2 etc?
Well, my only test setup is my MacBook Pro + external monitor.
As far as I can tell (but I really know very little about X11 stuff), there’s only one display in such a case.
But obviously some applications, like Safari, iTerm etc… know they are on a given “screen”, as the maximize button do not make them occupy the two screens I’d like to know how they do that (even w/o root api would be fine)
I would like to tell a bit more. When you have a TPad on a secondary screen and you call its drop-down menu or its context menu you get the menu itself on the primary screen. So if you open several TPads after a couple of seconds you don’t know longer from which TPad the menu is shown.
We use ROOT5.32 for windows (VC++ 7.1).
We don’t support multiple displays on Windows. This may happen in the future, but no fixed plans yet (not much requests and other priorities…)