summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gstplayer.cpp15
-rw-r--r--src/kmplayerapp.cpp2
2 files changed, 12 insertions, 5 deletions
diff --git a/src/gstplayer.cpp b/src/gstplayer.cpp
index ebf7b0d..c4bf580 100644
--- a/src/gstplayer.cpp
+++ b/src/gstplayer.cpp
@@ -1003,11 +1003,16 @@ int main(int argc, char **argv) {
gstapp->exec ();
XLockDisplay(display);
- XClientMessageEvent ev = {
- ClientMessage, 0, true, display, wid,
- XInternAtom (display, "XVIDEO", false), 8, {b: "quit_now"}
- };
- XSendEvent (display, wid, false, StructureNotifyMask, (XEvent *) & ev);
+ XEvent ev;
+ ev.xclient.type = ClientMessage;
+ ev.xclient.serial = 0;
+ ev.xclient.send_event = true;
+ ev.xclient.display = display;
+ ev.xclient.window = wid;
+ ev.xclient.message_type = XInternAtom (display, "XVIDEO", false);
+ ev.xclient.format = 8;
+ strcpy(ev.xclient.data.b, "quit_now");
+ XSendEvent (display, wid, false, StructureNotifyMask, &ev);
XFlush (display);
XUnlockDisplay(display);
eventThread->wait (500);
diff --git a/src/kmplayerapp.cpp b/src/kmplayerapp.cpp
index 27b26cd..bdeac91 100644
--- a/src/kmplayerapp.cpp
+++ b/src/kmplayerapp.cpp
@@ -17,6 +17,8 @@
#undef Always
+#include <unistd.h>
+
// include files for QT
#include <tqdatastream.h>
#include <tqregexp.h>