summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2015-10-14 15:37:30 +0200
committerfalkTX <falktx@gmail.com>2015-10-14 15:37:30 +0200
commit287802cd27fc9aab84762db3398e52e87fbe5ffd (patch)
treee84e5f175f144994afe6aab1acf63eed6312b4ab
parentb48a3437be61dbb9a0a360540ef5011b9d862171 (diff)
Remove hacks for finding real parent, hosts decide what to do
-rw-r--r--dgl/src/pugl/pugl_internal.h1
-rw-r--r--dgl/src/pugl/pugl_x11.c30
2 files changed, 3 insertions, 28 deletions
diff --git a/dgl/src/pugl/pugl_internal.h b/dgl/src/pugl/pugl_internal.h
index a97e6196..3ca59ca7 100644
--- a/dgl/src/pugl/pugl_internal.h
+++ b/dgl/src/pugl/pugl_internal.h
@@ -59,7 +59,6 @@ struct PuglViewImpl {
PuglInternals* impl;
PuglNativeWindow parent;
- PuglNativeWindow topparent;
PuglContextType ctx_type;
uintptr_t transient_parent;
diff --git a/dgl/src/pugl/pugl_x11.c b/dgl/src/pugl/pugl_x11.c
index 0d59c099..0ddcd339 100644
--- a/dgl/src/pugl/pugl_x11.c
+++ b/dgl/src/pugl/pugl_x11.c
@@ -461,33 +461,9 @@ dispatchKey(PuglView* view, XEvent* event, bool press)
send_event:
if (view->parent != 0) {
- if (view->topparent == 0) {
- uint nchildren;
- Window root, newparent, oldparent, *children;
-
- oldparent = view->topparent = view->parent;
- while (XQueryTree(view->impl->display, oldparent, &root, &newparent, &children, &nchildren) != 0) {
- if (nchildren == 0 || children == NULL) {
- break;
- }
- XFree(children);
- if (newparent == 0 || newparent == root) {
- break;
- }
-
- // FIXME: this needs a proper check for desktop-style window
- if (newparent < 0x6000000 &&
- XGetTransientForHint(view->impl->display, oldparent, &newparent) == 0) {
- break;
- }
-
- view->topparent = oldparent = newparent;
- }
- }
-
- event->xkey.time = 0; // purposefully set an invalid time, used for feedback detection
- event->xany.window = view->topparent;
- XSendEvent(view->impl->display, view->topparent, False, NoEventMask, event);
+ event->xkey.time = 0; // purposefully set an invalid time, used for feedback detection on bad hosts
+ event->xany.window = view->parent;
+ XSendEvent(view->impl->display, view->parent, False, NoEventMask, event);
}
}