Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

X11: real XConfigureEvents have position relative parent

  • Loading branch information...
commit 0ac9a815e2440bcd40654346b6d492d87b4573db 1 parent 9aa3f92
Joakim Plate authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 xbmc/windowing/WinEventsX11.cpp
12 xbmc/windowing/WinEventsX11.cpp
View
@@ -396,6 +396,18 @@ bool CWinEventsX11::ProcessConfigure (XConfigureEvent& xevent)
ret |= g_application.OnEvent(newEvent);
}
+ /* real events have position relative to parent */
+ if(!xevent.send_event) {
+ XWindowAttributes attr;
+ Window child;
+ XGetWindowAttributes(xevent.display, xevent.window, &attr);
+ XTranslateCoordinates(xevent.display
+ , xevent.window, attr.root
+ , xevent.x, xevent.x
+ , &xevent.x, &xevent.y
+ , &child);
+ }
+
/* check for move */
if(g_Windowing.GetLeft() != xevent.x
|| g_Windowing.GetTop() != xevent.y)
Please sign in to comment.
Something went wrong with that request. Please try again.