X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fscreeninfo.cc;h=2838c897f888f46180dd3b7f355f2ecc205d21ec;hb=8269fc2b3965d12ba308caa554bfa7ee037fba13;hp=560a56362a6edd164284c9d2b7de723da29947e9;hpb=99cd843fc6dc7a7f55b6c90fd1162f233853aad2;p=chaz%2Fopenbox diff --git a/otk/screeninfo.cc b/otk/screeninfo.cc index 560a5636..2838c897 100644 --- a/otk/screeninfo.cc +++ b/otk/screeninfo.cc @@ -1,8 +1,6 @@ // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- -#ifdef HAVE_CONFIG_H -# include "../config.h" -#endif // HAVE_CONFIG_H +#include "config.h" extern "C" { #include @@ -17,7 +15,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);