mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
Add buffer_width and buffer_height ivars and use them instead of xframe to keep track of buffer sizes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@19636 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
555b1602b8
commit
e4e8a33716
3 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2004-06-28 00:45 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Headers/x11/XGServerWindow.h: Add buffer_width and buffer_height
|
||||
ivars.
|
||||
* Source/x11/XGServerWindow.m (-windowdevice:): Use buffer_width and
|
||||
buffer_height instead of xframe to keep track of the size of the
|
||||
buffer and alpha_buffer.
|
||||
|
||||
2004-06-28 00:41 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/xlib/XGGState.m (-setWindowDevice:): Remove use of
|
||||
|
|
|
@ -80,6 +80,9 @@ typedef struct _gswindow_device_t {
|
|||
int visibility; /* X visibility */
|
||||
NSBackingStoreType type; /* Backing type */
|
||||
NSRect xframe; /* Window frame */
|
||||
|
||||
unsigned int buffer_width; /* Size in pixels of the current buffers. */
|
||||
unsigned int buffer_height;
|
||||
Drawable buffer; /* Backing store pixmap */
|
||||
Drawable alpha_buffer; /* Alpha buffer. Managed by gdriver
|
||||
will be freed if HandlesBacking=0 */
|
||||
|
|
|
@ -1472,8 +1472,9 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
|
|||
NSDebugLLog (@"NSWindow", @"window geom device ((%f, %f), (%f, %f))",
|
||||
window->xframe.origin.x, window->xframe.origin.y,
|
||||
window->xframe.size.width, window->xframe.size.height);
|
||||
|
||||
if (window->buffer && (old_width != width || old_height != height)
|
||||
|
||||
if (window->buffer
|
||||
&& (window->buffer_width != width || window->buffer_height != height)
|
||||
&& (window->gdriverProtocol & GDriverHandlesBacking) == 0)
|
||||
{
|
||||
[isa waitAllContexts];
|
||||
|
@ -1484,6 +1485,9 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
|
|||
window->alpha_buffer = 0;
|
||||
}
|
||||
|
||||
window->buffer_width = width;
|
||||
window->buffer_height = height;
|
||||
|
||||
if (window->buffer == 0)
|
||||
{
|
||||
[self _createBuffer: window];
|
||||
|
|
Loading…
Reference in a new issue