summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-07 11:43:03 (GMT)
committerfluxgen <fluxgen>2003-05-07 11:43:03 (GMT)
commit10211d5fec411f369e6c3af135438054e7e9621f (patch)
treee5fdb3cb4b8828c8e8c913f91c430a7567fc9b84
parent3aea45175d0ead3c17e6f102f0992dbd975102b7 (diff)
downloadfluxbox_lack-10211d5fec411f369e6c3af135438054e7e9621f.zip
fluxbox_lack-10211d5fec411f369e6c3af135438054e7e9621f.tar.bz2
better error msg
-rw-r--r--src/BaseDisplay.cc41
1 files changed, 22 insertions, 19 deletions
diff --git a/src/BaseDisplay.cc b/src/BaseDisplay.cc
index bf17920..1993793 100644
--- a/src/BaseDisplay.cc
+++ b/src/BaseDisplay.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: BaseDisplay.cc,v 1.27 2003/04/28 00:39:34 fluxgen Exp $ 25// $Id: BaseDisplay.cc,v 1.28 2003/05/07 11:43:03 fluxgen Exp $
26 26
27 27
28 28
@@ -134,12 +134,15 @@ BaseDisplay::BaseDisplay(const char *app_name, const char *dpy_name):FbTk::App(d
134 I18n *i18n = I18n::instance(); 134 I18n *i18n = I18n::instance();
135 135
136 if (display() == 0) { 136 if (display() == 0) {
137 throw string( 137 throw string("Can not connect to X server."
138 i18n-> 138 "Make sure you started X before you start Fluxbox and"
139 getMessage( 139 "that you do not have any other window manager running at the same time.");
140 FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXConnectFail, 140 /*
141 "BaseDisplay::BaseDisplay: connection to X server failed.")); 141 i18n->
142 142 getMessage(
143 FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXConnectFail,
144 "BaseDisplay::BaseDisplay: connection to X server failed."));
145 */
143 } else if (fcntl(ConnectionNumber(display()), F_SETFD, 1) == -1) { 146 } else if (fcntl(ConnectionNumber(display()), F_SETFD, 1) == -1) {
144 throw string( 147 throw string(
145 i18n-> 148 i18n->
@@ -366,9 +369,9 @@ unsigned int ScreenInfo::getCurrHead(void) const {
366 return 0; 369 return 0;
367} 370}
368 371
369//----------- getHeadWidth ------------ 372/**
370// Returns the width of head 373 @return the width of head
371//------------------------------------- 374*/
372unsigned int ScreenInfo::getHeadWidth(unsigned int head) const { 375unsigned int ScreenInfo::getHeadWidth(unsigned int head) const {
373 376
374 if (hasXinerama()) { 377 if (hasXinerama()) {
@@ -386,9 +389,9 @@ unsigned int ScreenInfo::getHeadWidth(unsigned int head) const {
386 389
387} 390}
388 391
389//----------- getHeadHeight ------------ 392/**
390// Returns the heigt of head 393 @return the heigt of head
391//-------------------------------------- 394*/
392unsigned int ScreenInfo::getHeadHeight(unsigned int head) const { 395unsigned int ScreenInfo::getHeadHeight(unsigned int head) const {
393 396
394 if (hasXinerama()) { 397 if (hasXinerama()) {
@@ -406,9 +409,9 @@ unsigned int ScreenInfo::getHeadHeight(unsigned int head) const {
406} 409}
407 410
408 411
409//----------- getHeadX ----------------- 412/**
410// Returns the X start of head nr head 413 @return the X start of head nr head
411//-------------------------------------- 414*/
412int ScreenInfo::getHeadX(unsigned int head) const { 415int ScreenInfo::getHeadX(unsigned int head) const {
413 if (hasXinerama()) { 416 if (hasXinerama()) {
414 if ((signed) head >= xineramaNumHeads) { 417 if ((signed) head >= xineramaNumHeads) {
@@ -424,9 +427,9 @@ int ScreenInfo::getHeadX(unsigned int head) const {
424 return 0; 427 return 0;
425} 428}
426 429
427//----------- getHeadY ----------------- 430/**
428// Returns the Y start of head 431 @return the Y start of head
429//-------------------------------------- 432*/
430int ScreenInfo::getHeadY(unsigned int head) const { 433int ScreenInfo::getHeadY(unsigned int head) const {
431 if (hasXinerama()) { 434 if (hasXinerama()) {
432 if ((signed) head >= xineramaNumHeads) { 435 if ((signed) head >= xineramaNumHeads) {