mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 17:00:52 +00:00
Clarify names/comments for rectangle invalidation mechanism
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@23405 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a492ec8814
commit
8de554b08f
1 changed files with 15 additions and 13 deletions
|
@ -141,7 +141,7 @@ setNormalHints(Display *d, gswindow_device_t *w)
|
||||||
NSDebugLLog(@"XGTrace", @"Hint incr %d: %d, %d",
|
NSDebugLLog(@"XGTrace", @"Hint incr %d: %d, %d",
|
||||||
w->number, w->siz_hints.width_inc, w->siz_hints.height_inc);
|
w->number, w->siz_hints.width_inc, w->siz_hints.height_inc);
|
||||||
if (handlesWindowDecorations
|
if (handlesWindowDecorations
|
||||||
&& !(w->win_attrs.window_style & NSResizableWindowMask))
|
&& !(w->win_attrs.window_style & NSResizableWindowMask))
|
||||||
{
|
{
|
||||||
/* Some silly window managers (*cough* metacity *cough*) ignore
|
/* Some silly window managers (*cough* metacity *cough*) ignore
|
||||||
our "non-resizable" hints unless we set the min and max
|
our "non-resizable" hints unless we set the min and max
|
||||||
|
@ -360,7 +360,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
||||||
|
|
||||||
@implementation XGServer (WindowOps)
|
@implementation XGServer (WindowOps)
|
||||||
|
|
||||||
-(BOOL) handlesWindowDecorations
|
- (BOOL) handlesWindowDecorations
|
||||||
{
|
{
|
||||||
return handlesWindowDecorations;
|
return handlesWindowDecorations;
|
||||||
}
|
}
|
||||||
|
@ -401,6 +401,8 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
||||||
* Convert a window frame in OpenStep absolute screen coordinates to
|
* Convert a window frame in OpenStep absolute screen coordinates to
|
||||||
* a frame in X absolute screen coordinates by flipping an applying
|
* a frame in X absolute screen coordinates by flipping an applying
|
||||||
* offsets to allow for the X window decorations.
|
* offsets to allow for the X window decorations.
|
||||||
|
* The result is the rectangle of the window we can actually draw
|
||||||
|
* to (in the X coordinate system).
|
||||||
*/
|
*/
|
||||||
- (NSRect) _OSFrameToXFrame: (NSRect)o for: (void*)window
|
- (NSRect) _OSFrameToXFrame: (NSRect)o for: (void*)window
|
||||||
{
|
{
|
||||||
|
@ -447,10 +449,11 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert a window frame in X coordinates relative to the X-window to a frame
|
* Convert a rectangle in X coordinates relative to the X-window
|
||||||
* in OpenStep coordinates relative to the window by flipping.
|
* to a rectangle in OpenStep coordinates in the topmost view in the
|
||||||
|
* NSWindow.
|
||||||
*/
|
*/
|
||||||
- (NSRect) _XWinFrameToOSWinFrame: (NSRect)x for: (void*)window
|
- (NSRect) _XWinRectToOSViewRect: (NSRect)x for: (void*)window
|
||||||
{
|
{
|
||||||
gswindow_device_t *win = (gswindow_device_t*)window;
|
gswindow_device_t *win = (gswindow_device_t*)window;
|
||||||
NSRect o;
|
NSRect o;
|
||||||
|
@ -459,7 +462,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
||||||
o.origin.x = x.origin.x;
|
o.origin.x = x.origin.x;
|
||||||
o.origin.y = win->siz_hints.height - x.origin.y;
|
o.origin.y = win->siz_hints.height - x.origin.y;
|
||||||
o.origin.y = o.origin.y - o.size.height;
|
o.origin.y = o.origin.y - o.size.height;
|
||||||
NSDebugLLog(@"Frame", @"XW2OW %@ %@",
|
NSDebugLLog(@"Frame", @"XW2OV %@ %@",
|
||||||
NSStringFromRect(x), NSStringFromRect(o));
|
NSStringFromRect(x), NSStringFromRect(o));
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
@ -2633,13 +2636,12 @@ static BOOL didCreatePixmaps;
|
||||||
// to set the clipping path.
|
// to set the clipping path.
|
||||||
XUnionRectWithRegion (&rectangle, window->region, window->region);
|
XUnionRectWithRegion (&rectangle, window->region, window->region);
|
||||||
|
|
||||||
// Transform the rectangle's coordinates to PS coordinates and add
|
// Transform the rectangle's coordinates to OS coordinates and add
|
||||||
// this new rectangle to the list of exposed rectangles.
|
// this new rectangle to the list of exposed rectangles.
|
||||||
{
|
{
|
||||||
rect = [self _XWinFrameToOSWinFrame:
|
rect = [self _XWinRectToOSViewRect: NSMakeRect(
|
||||||
NSMakeRect(rectangle.x, rectangle.y,
|
rectangle.x, rectangle.y, rectangle.width, rectangle.height)
|
||||||
rectangle.width, rectangle.height)
|
for: window];
|
||||||
for: window];
|
|
||||||
[window->exposedRects addObject: [NSValue valueWithRect: rect]];
|
[window->exposedRects addObject: [NSValue valueWithRect: rect]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2726,7 +2728,7 @@ static BOOL didCreatePixmaps;
|
||||||
// FIXME: It seems wierd to trigger a front-end method from here...
|
// FIXME: It seems wierd to trigger a front-end method from here...
|
||||||
|
|
||||||
// We simply invalidate the
|
// We simply invalidate the
|
||||||
// corresponding rectangle of the contentview.
|
// corresponding rectangle of the top most view of the window.
|
||||||
|
|
||||||
gui_win = GSWindowWithNumber(win);
|
gui_win = GSWindowWithNumber(win);
|
||||||
|
|
||||||
|
@ -2737,7 +2739,7 @@ static BOOL didCreatePixmaps;
|
||||||
NSValue *val[n];
|
NSValue *val[n];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
v = [gui_win contentView];
|
v = [gui_win _windowView];
|
||||||
|
|
||||||
[window->exposedRects getObjects: val];
|
[window->exposedRects getObjects: val];
|
||||||
for (i = 0; i < n; ++i)
|
for (i = 0; i < n; ++i)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue