mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
fix enable/disable flush
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4835 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
80ba6f7d92
commit
c4436b7582
3 changed files with 16 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Sep 6 6:37:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSWindow.m: added enable/disable flush fix from dawn.
|
||||
* Headers/NSWindow.h: added enable/disable flush fix from dawn.
|
||||
|
||||
1999-09-05 Michael Hanni <mhanni@sprintmail.com>
|
||||
|
||||
* Source/NSMenuView.m: fix nagging bug reported by Gregory John
|
||||
|
|
|
@ -110,6 +110,7 @@ extern NSSize NSTokenSize;
|
|||
int window_level;
|
||||
NSRect rectNeedingFlush;
|
||||
NSMutableArray *rectsBeingDrawn;
|
||||
unsigned disable_flush_window;
|
||||
|
||||
BOOL accepts_drag;
|
||||
BOOL is_one_shot;
|
||||
|
@ -130,7 +131,6 @@ extern NSSize NSTokenSize;
|
|||
BOOL is_edited;
|
||||
BOOL is_released_when_closed;
|
||||
BOOL is_miniaturized;
|
||||
BOOL disable_flush_window;
|
||||
BOOL menu_exclude;
|
||||
BOOL hides_on_deactivate;
|
||||
BOOL accepts_mouse_moved;
|
||||
|
|
|
@ -779,7 +779,7 @@ static NSRecursiveLock *windowsLock;
|
|||
*/
|
||||
- (void) disableFlushWindow
|
||||
{
|
||||
disable_flush_window = YES;
|
||||
disable_flush_window++;
|
||||
}
|
||||
|
||||
- (void) display
|
||||
|
@ -824,7 +824,7 @@ static NSRecursiveLock *windowsLock;
|
|||
|
||||
- (void) flushWindowIfNeeded
|
||||
{
|
||||
if (!disable_flush_window && needs_flush)
|
||||
if (disable_flush_window == 0 && needs_flush == YES)
|
||||
{
|
||||
needs_flush = NO;
|
||||
[self flushWindow];
|
||||
|
@ -838,7 +838,10 @@ static NSRecursiveLock *windowsLock;
|
|||
|
||||
- (void) enableFlushWindow
|
||||
{
|
||||
disable_flush_window = NO;
|
||||
if (disable_flush_window > 0)
|
||||
{
|
||||
disable_flush_window--;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) isAutodisplay
|
||||
|
@ -848,7 +851,7 @@ static NSRecursiveLock *windowsLock;
|
|||
|
||||
- (BOOL) isFlushWindowDisabled
|
||||
{
|
||||
return disable_flush_window;
|
||||
return disable_flush_window == 0 ? NO : YES;
|
||||
}
|
||||
|
||||
- (void) setAutodisplay: (BOOL)flag
|
||||
|
@ -2005,6 +2008,7 @@ static NSRecursiveLock *windowsLock;
|
|||
[aCoder encodeObject: miniaturized_image];
|
||||
[aCoder encodeValueOfObjCType: @encode(NSBackingStoreType) at: &backing_type];
|
||||
[aCoder encodeValueOfObjCType: @encode(int) at: &window_level];
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &disable_flush_window];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_one_shot];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_autodisplay];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &optimize_drawing];
|
||||
|
@ -2012,7 +2016,6 @@ static NSRecursiveLock *windowsLock;
|
|||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &dynamic_depth_limit];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cursor_rects_enabled];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_released_when_closed];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &disable_flush_window];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &hides_on_deactivate];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &accepts_mouse_moved];
|
||||
|
||||
|
@ -2047,6 +2050,7 @@ static NSRecursiveLock *windowsLock;
|
|||
[aDecoder decodeValueOfObjCType: @encode(NSBackingStoreType)
|
||||
at: &backing_type];
|
||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &window_level];
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &disable_flush_window];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_one_shot];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_autodisplay];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &optimize_drawing];
|
||||
|
@ -2054,7 +2058,6 @@ static NSRecursiveLock *windowsLock;
|
|||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &dynamic_depth_limit];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cursor_rects_enabled];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_released_when_closed];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &disable_flush_window];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &hides_on_deactivate];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &accepts_mouse_moved];
|
||||
|
||||
|
@ -2133,7 +2136,7 @@ static NSRecursiveLock *windowsLock;
|
|||
is_edited = NO;
|
||||
is_released_when_closed = YES;
|
||||
is_miniaturized = NO;
|
||||
disable_flush_window = NO;
|
||||
disable_flush_window = 0;
|
||||
menu_exclude = NO;
|
||||
hides_on_deactivate = NO;
|
||||
accepts_mouse_moved = NO;
|
||||
|
|
Loading…
Reference in a new issue