mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 17:00:52 +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
bd0b1af249
commit
d64abeb81b
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>
|
2005-01-12 00:32 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
* Source/gsc/GSStreamContext.m (-DPSsetstrokeadjust:):
|
* Source/gsc/GSStreamContext.m (-DPSsetstrokeadjust:):
|
||||||
|
|
|
@ -571,9 +571,23 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym,
|
||||||
Window source;
|
Window source;
|
||||||
Atom action;
|
Atom action;
|
||||||
NSDragOperation operation;
|
NSDragOperation operation;
|
||||||
|
int root_x, root_y;
|
||||||
|
Window root_child;
|
||||||
|
|
||||||
NSDebugLLog(@"NSDragging", @" XdndPosition message\n");
|
NSDebugLLog(@"NSDragging", @" XdndPosition message\n");
|
||||||
source = XDND_POSITION_SOURCE_WIN(&xEvent);
|
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) -
|
eventLocation.x = XDND_POSITION_ROOT_X(&xEvent) -
|
||||||
NSMinX(cWin->xframe);
|
NSMinX(cWin->xframe);
|
||||||
eventLocation.y = XDND_POSITION_ROOT_Y(&xEvent) -
|
eventLocation.y = XDND_POSITION_ROOT_Y(&xEvent) -
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue