Get the desktop resolution and more

I need to know the resolution of my screen (I use the KDE desktop environment or WindowMaker) because I need to create the canvases of the same dimension of the screen. Is there a call in root to get the resolution of the screen?
I need also to create the canvases in one of the multiple desktops of the KDE or WindowMaker environment. How is it possible to do this?

Thank you very much

Best regards
Andrea Bulgarelli

Hi Andrea,
Did you mean by resolution the display width and height? If yes, then:

   UInt_t dw = gClient->GetDisplayWidth();
   UInt_t dh = gClient->GetDisplayHeight();

I have no answer of the second question.

Cheers, Ilka