mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 23:42:16 +00:00
compute XdndPosition coordinates from X function as cached may be wrong for app icon
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20557 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2cbb830c37
commit
401c46d17a
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-11-04 Adrian Robert <arobert@cogsci.ucsd.edu>
|
||||
|
||||
* Source/x11/XGServerEvent.m (-processEvent:): For XdndPosition
|
||||
event (ClientMessage), convert the point from root coordinates
|
||||
using XTranslateCoordinates() instead of relying on cached window
|
||||
position. Update cached window position from this.
|
||||
|
||||
2005-01-12 00:32 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/gsc/GSStreamContext.m (-DPSsetstrokeadjust:):
|
||||
|
|
|
@ -571,9 +571,23 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym,
|
|||
Window source;
|
||||
Atom action;
|
||||
NSDragOperation operation;
|
||||
int root_x, root_y;
|
||||
Window root_child;
|
||||
|
||||
NSDebugLLog(@"NSDragging", @" XdndPosition message\n");
|
||||
source = XDND_POSITION_SOURCE_WIN(&xEvent);
|
||||
/*
|
||||
Work around a bug/feature in WindowMaker that does not
|
||||
send ConfigureNotify events for app icons.
|
||||
*/
|
||||
XTranslateCoordinates(dpy, xEvent.xclient.window,
|
||||
RootWindow(dpy, cWin->screen),
|
||||
0, 0,
|
||||
&root_x, &root_y,
|
||||
&root_child);
|
||||
cWin->xframe.origin.x = root_x;
|
||||
cWin->xframe.origin.y = root_y;
|
||||
|
||||
eventLocation.x = XDND_POSITION_ROOT_X(&xEvent) -
|
||||
NSMinX(cWin->xframe);
|
||||
eventLocation.y = XDND_POSITION_ROOT_Y(&xEvent) -
|
||||
|
|
Loading…
Reference in a new issue