mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-13 16:51:05 +00:00
Implement new method -setPartentWindow:forChildWindow: for X and
Windows. Adjust y coordinate of point in compositeGState:... for cairo. This solves bug #24709. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27718 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d9f8287ba9
commit
f99e97c43e
4 changed files with 49 additions and 9 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,11 +1,19 @@
|
||||||
|
2009-01-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/win32/WIN32Server.m (-setPartentWindow:forChildWindow:),
|
||||||
|
* Source/x11/XGServerWindow.m (-setPartentWindow:forChildWindow:):
|
||||||
|
Implement new method.
|
||||||
|
* Source/cairo/CairoGState.m (-compositeGState:...): Adjust y
|
||||||
|
coordinate of point.
|
||||||
|
|
||||||
2009-01-25 Riccardo Mottola <rmottola@users.sf.net>
|
2009-01-25 Riccardo Mottola <rmottola@users.sf.net>
|
||||||
|
|
||||||
* Source/art/image.m: Fix for big-endiam machines
|
* Source/art/image.m: Fix for big-endiam machines
|
||||||
|
|
||||||
|
|
||||||
2009-01-24 Riccardo Mottola <rmottola@users.sf.net>
|
2009-01-24 Riccardo Mottola <rmottola@users.sf.net>
|
||||||
|
|
||||||
* Source/art/image.m: Optimized and correct handling of 16 bit in _get_8_bits()
|
* Source/art/image.m: Optimized and correct handling of 16 bit in
|
||||||
|
_get_8_bits()
|
||||||
|
|
||||||
2009-01-17 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2009-01-17 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
|
|
@ -1277,7 +1277,7 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
||||||
[source->ctm boundingRectFor: aRect result: &aRect];
|
[source->ctm boundingRectFor: aRect result: &aRect];
|
||||||
|
|
||||||
x = floorf(aPoint.x);
|
x = floorf(aPoint.x);
|
||||||
y = floorf(aPoint.y);
|
y = floorf(aPoint.y + 0.5);
|
||||||
minx = NSMinX(aRect);
|
minx = NSMinX(aRect);
|
||||||
miny = NSMinY(aRect);
|
miny = NSMinY(aRect);
|
||||||
width = NSWidth(aRect);
|
width = NSWidth(aRect);
|
||||||
|
|
|
@ -1563,6 +1563,11 @@ NSLog(@"Callback");
|
||||||
SetCursor((HCURSOR)cid);
|
SetCursor((HCURSOR)cid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) setPartentWindow: (int)partentWin
|
||||||
|
forChildWindow: (int)childWin
|
||||||
|
{
|
||||||
|
SetParent((HWND)childWin, (HWND)partentWin);
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -727,6 +727,8 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
||||||
window->xwn_attrs.border_pixel = context->black;
|
window->xwn_attrs.border_pixel = context->black;
|
||||||
window->xwn_attrs.background_pixel = context->white;
|
window->xwn_attrs.background_pixel = context->white;
|
||||||
window->xwn_attrs.colormap = context->cmap;
|
window->xwn_attrs.colormap = context->cmap;
|
||||||
|
window->xwn_attrs.save_under = False;
|
||||||
|
window->xwn_attrs.override_redirect = False;
|
||||||
|
|
||||||
window->ident = XCreateWindow(dpy, window->root,
|
window->ident = XCreateWindow(dpy, window->root,
|
||||||
NSMinX(frame), NSMinY(frame),
|
NSMinX(frame), NSMinY(frame),
|
||||||
|
@ -735,7 +737,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
||||||
context->depth,
|
context->depth,
|
||||||
CopyFromParent,
|
CopyFromParent,
|
||||||
context->visual,
|
context->visual,
|
||||||
(CWColormap | CWBackPixel | CWBorderPixel),
|
(CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect),
|
||||||
&window->xwn_attrs);
|
&window->xwn_attrs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -745,8 +747,6 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
||||||
classhint.res_class = "GNUstep";
|
classhint.res_class = "GNUstep";
|
||||||
XSetClassHint(dpy, window->ident, &classhint);
|
XSetClassHint(dpy, window->ident, &classhint);
|
||||||
|
|
||||||
window->xwn_attrs.save_under = False;
|
|
||||||
window->xwn_attrs.override_redirect = False;
|
|
||||||
window->map_state = IsUnmapped;
|
window->map_state = IsUnmapped;
|
||||||
window->visibility = 2;
|
window->visibility = 2;
|
||||||
|
|
||||||
|
@ -1207,8 +1207,10 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
||||||
generic.wintypes.win_dnd_atom =
|
generic.wintypes.win_dnd_atom =
|
||||||
XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DND", False);
|
XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DND", False);
|
||||||
//KDE extensions
|
//KDE extensions
|
||||||
|
#ifdef USE_KDE_OVERRIDE
|
||||||
generic.wintypes.win_override_atom =
|
generic.wintypes.win_override_atom =
|
||||||
XInternAtom(dpy, "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", False);
|
XInternAtom(dpy, "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", False);
|
||||||
|
#endif
|
||||||
generic.wintypes.win_topmenu_atom =
|
generic.wintypes.win_topmenu_atom =
|
||||||
XInternAtom(dpy, "_KDE_NET_WM_WINDOW_TYPE_TOPMENU", False);
|
XInternAtom(dpy, "_KDE_NET_WM_WINDOW_TYPE_TOPMENU", False);
|
||||||
|
|
||||||
|
@ -1909,6 +1911,13 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
||||||
window->xwn_attrs.border_pixel = context->black;
|
window->xwn_attrs.border_pixel = context->black;
|
||||||
window->xwn_attrs.background_pixel = context->white;
|
window->xwn_attrs.background_pixel = context->white;
|
||||||
window->xwn_attrs.colormap = context->cmap;
|
window->xwn_attrs.colormap = context->cmap;
|
||||||
|
window->xwn_attrs.save_under = False;
|
||||||
|
/*
|
||||||
|
* Setting this to True should only be done, when we also grap the pointer.
|
||||||
|
* It could be done for popup windows, but at this point we don't know
|
||||||
|
* about the usage of the window.
|
||||||
|
*/
|
||||||
|
window->xwn_attrs.override_redirect = False;
|
||||||
|
|
||||||
window->ident = XCreateWindow(dpy, window->root,
|
window->ident = XCreateWindow(dpy, window->root,
|
||||||
NSMinX(frame), NSMinY(frame),
|
NSMinX(frame), NSMinY(frame),
|
||||||
|
@ -1917,7 +1926,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
||||||
context->depth,
|
context->depth,
|
||||||
CopyFromParent,
|
CopyFromParent,
|
||||||
context->visual,
|
context->visual,
|
||||||
(CWColormap | CWBackPixel | CWBorderPixel),
|
(CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect),
|
||||||
&window->xwn_attrs);
|
&window->xwn_attrs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1927,8 +1936,6 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
||||||
classhint.res_class = "GNUstep";
|
classhint.res_class = "GNUstep";
|
||||||
XSetClassHint(dpy, window->ident, &classhint);
|
XSetClassHint(dpy, window->ident, &classhint);
|
||||||
|
|
||||||
window->xwn_attrs.save_under = False;
|
|
||||||
window->xwn_attrs.override_redirect = False;
|
|
||||||
window->map_state = IsUnmapped;
|
window->map_state = IsUnmapped;
|
||||||
window->visibility = -1;
|
window->visibility = -1;
|
||||||
|
|
||||||
|
@ -4615,4 +4622,24 @@ _computeDepth(int class, int bpp)
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) setPartentWindow: (int)partentWin
|
||||||
|
forChildWindow: (int)childWin
|
||||||
|
{
|
||||||
|
gswindow_device_t *cwindow;
|
||||||
|
gswindow_device_t *pwindow;
|
||||||
|
Window p;
|
||||||
|
|
||||||
|
cwindow = WINDOW_WITH_TAG(childWin);
|
||||||
|
if (!cwindow)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pwindow = WINDOW_WITH_TAG(partentWin);
|
||||||
|
if (!pwindow)
|
||||||
|
p = None;
|
||||||
|
else
|
||||||
|
p = pwindow->ident;
|
||||||
|
|
||||||
|
XSetTransientForHint(dpy, cwindow->ident, p);
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in a new issue