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
for instance.
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.
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)
Hi!
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).
Thanks!