marlonjke
marlonjke

Reputation: 49

How can I get the real size of the screen on Ubuntu?

I developed a auto-hide toolbar in Windows. Basically this toolbar appear on the screen when the mouse is moved to the right corner of the screen. Now I'm trying to run the same program on Ubuntu 12.10 but the bar is switching between the 4 screens of Unity. How can I fix this?

Upvotes: 0

Views: 353

Answers (1)

Kumar Vivek Mitra
Kumar Vivek Mitra

Reputation: 33544

- Use Toolkit to get the Screen width and height

Eg:

Toolkit tool = Toolkit.getDefaultToolkit();
Dimension dim = tool.getScreenSize();
int screenWidth = dim.width;
int screenHeight = dim.height;

Upvotes: 1

Related Questions