summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-05-27 22:41:54 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-05-27 22:41:54 +0200
commit63d17469617df96931e13c006f62810b6eeade72 (patch)
treea37ad7f50d31ac15215faf102b12186b6ed34cf7
parent5d52cee064372bb7400e4fe537b9bab8d1502a3d (diff)
more xembed porting
-rw-r--r--src/xembed.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/xembed.cc b/src/xembed.cc
index f5b3ae51..f180d81d 100644
--- a/src/xembed.cc
+++ b/src/xembed.cc
@@ -77,7 +77,7 @@ Xembed::handle(int e) {
return Fl_Window::handle(e);
}
-static int event_handler(int e) {
+static int event_handler(int e, Fl_Window *w) {
Atom xembed_atom = XInternAtom (fl_display, "_XEMBED", false);
if (fl_xevent->type == ClientMessage) {
@@ -88,10 +88,8 @@ static int event_handler(int e) {
case XEMBED_WINDOW_ACTIVATE:
// Force a ConfigureNotify message so fltk can get the new
// coordinates after a move of the embedder window.
-#if 0
-PORT1.3
- w->resize(0, 0, w->w(), w->h());
-#endif
+ if (w)
+ w->resize(0,0, w->w(), w->h());
break;
case XEMBED_WINDOW_DEACTIVATE:
break;
@@ -101,7 +99,7 @@ PORT1.3
}
}
- return 0;
+ return Fl::handle_(e, w);
}
// TODO: Implement more XEMBED support;
@@ -109,7 +107,7 @@ PORT1.3
void Xembed::show() {
createInternal(xid);
setXembedInfo(1);
- Fl::add_handler(event_handler);
+ Fl::event_dispatch(event_handler);
}
void Xembed::createInternal(uint32_t parent) {