summaryrefslogtreecommitdiff
path: root/src/aquamarine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/aquamarine.cpp')
-rw-r--r--src/aquamarine.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/aquamarine.cpp b/src/aquamarine.cpp
index 2920dc1..8ee8485 100644
--- a/src/aquamarine.cpp
+++ b/src/aquamarine.cpp
@@ -57,6 +57,11 @@ main (int argc, char **argv)
{
char *display = 0;
Display *dpy = XOpenDisplay (display);
+ if (!dpy)
+ {
+ qWarning ("cannot connect to X server ");
+ exit (1);
+ }
int screen = DefaultScreen (dpy);
KCmdLineArgs::init (argc, argv, "aquamarine", I18N_NOOP ("Aquamarine"),
@@ -74,12 +79,7 @@ main (int argc, char **argv)
int rv = 1;
do
{
-
- if (!dpy)
- {
- qWarning ("cannot connect to X server ");
- exit (1);
- }
+ Aquamarine::trapXError();
Bool wmRunning = false;
do
@@ -132,10 +132,10 @@ main (int argc, char **argv)
printf("New Window Manager\n");
foundWM = true;
}
- } while (xev.type == ClientMessage &&
- xev.xclient.message_type == manager &&
- (Atom)xev.xclient.data.l[1] == wm_sn);
+ } while (!foundWM);
}
+ Aquamarine::popXError(dpy);
+
} while (!wmRunning);
Aquamarine::Decorator *app = new Aquamarine::Decorator();