Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

X11: real XConfigureEvents have position relative parent

  • Loading branch information...
commit 0ac9a815e2440bcd40654346b6d492d87b4573db 1 parent 9aa3f92
Joakim Plate authored

Showing 1 changed file with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. +12 0 xbmc/windowing/WinEventsX11.cpp
12 xbmc/windowing/WinEventsX11.cpp
@@ -396,6 +396,18 @@ bool CWinEventsX11::ProcessConfigure (XConfigureEvent& xevent)
396 396 ret |= g_application.OnEvent(newEvent);
397 397 }
398 398
  399 + /* real events have position relative to parent */
  400 + if(!xevent.send_event) {
  401 + XWindowAttributes attr;
  402 + Window child;
  403 + XGetWindowAttributes(xevent.display, xevent.window, &attr);
  404 + XTranslateCoordinates(xevent.display
  405 + , xevent.window, attr.root
  406 + , xevent.x, xevent.x
  407 + , &xevent.x, &xevent.y
  408 + , &child);
  409 + }
  410 +
399 411 /* check for move */
400 412 if(g_Windowing.GetLeft() != xevent.x
401 413 || g_Windowing.GetTop() != xevent.y)

0 comments on commit 0ac9a81

Please sign in to comment.
Something went wrong with that request. Please try again.