summaryrefslogtreecommitdiff
path: root/otk/screeninfo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'otk/screeninfo.cc')
-rw-r--r--otk/screeninfo.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/otk/screeninfo.cc b/otk/screeninfo.cc
index 560a5636..535156e9 100644
--- a/otk/screeninfo.cc
+++ b/otk/screeninfo.cc
@@ -17,7 +17,9 @@ using std::string;
namespace otk {
-ScreenInfo::ScreenInfo(unsigned int num) {
+ScreenInfo::ScreenInfo(int num) {
+ assert(num >= 0 && num < ScreenCount(**display));
+
_screen = num;
_root_window = RootWindow(**display, _screen);