-
Notifications
You must be signed in to change notification settings - Fork 1
/
WS9Wine1.7.11-noflicker-unneback.diff
executable file
·138 lines (121 loc) · 4.31 KB
/
WS9Wine1.7.11-noflicker-unneback.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
--- a/dlls/winemac.drv/cocoa_window.m 2014-01-17 20:48:48.000000000 +0100
+++ b/dlls/winemac.drv/cocoa_window.m 2014-01-25 11:59:50.000000000 +0100
@@ -194,8 +194,6 @@
@property (retain, nonatomic) NSTimer* liveResizeDisplayTimer;
- - (void) updateColorSpace;
-
- (BOOL) becameEligibleParentOrChild;
- (void) becameIneligibleChild;
@@ -319,14 +317,12 @@
[self setNeedsDisplay:YES];
}
- [(WineWindow*)[self window] updateColorSpace];
}
- (void) removeGLContext:(WineOpenGLContext*)context
{
[glContexts removeObjectIdenticalTo:context];
[pendingGlContexts removeObjectIdenticalTo:context];
- [(WineWindow*)[self window] updateColorSpace];
}
- (void) updateGLContexts
@@ -335,11 +331,6 @@
context.needsUpdate = TRUE;
}
- - (BOOL) hasGLContext
- {
- return [glContexts count] || [pendingGlContexts count];
- }
-
- (BOOL) acceptsFirstMouse:(NSEvent*)theEvent
{
return YES;
@@ -1310,9 +1301,6 @@
if (needEnableScreenUpdates)
NSEnableScreenUpdates();
- if (!equalSizes)
- [self updateColorSpace];
-
if (!enteringFullScreen &&
[[NSProcessInfo processInfo] systemUptime] - enteredFullScreenTime > 1.0)
nonFullscreenFrame = frame;
@@ -1571,37 +1559,6 @@
[super toggleFullScreen:sender];
}
- // We normally use the generic/calibrated RGB color space for the window,
- // rather than the device color space, to avoid expensive color conversion
- // which slows down drawing. However, for windows displaying OpenGL, having
- // a different color space than the screen greatly reduces frame rates, often
- // limiting it to the display refresh rate.
- //
- // To avoid this, we switch back to the screen color space whenever the
- // window is covered by a view with an attached OpenGL context.
- - (void) updateColorSpace
- {
- NSRect contentRect = [[self contentView] frame];
- BOOL coveredByGLView = FALSE;
- for (WineContentView* view in [[self contentView] subviews])
- {
- if ([view hasGLContext])
- {
- NSRect frame = [view convertRect:[view bounds] toView:nil];
- if (NSContainsRect(frame, contentRect))
- {
- coveredByGLView = TRUE;
- break;
- }
- }
- }
-
- if (coveredByGLView)
- [self setColorSpace:nil];
- else
- [self setColorSpace:[NSColorSpace genericRGBColorSpace]];
- }
-
/*
* ---------- NSResponder method overrides ----------
@@ -2436,7 +2393,6 @@
name:NSApplicationDidChangeScreenParametersNotification
object:NSApp];
[[window contentView] addSubview:view];
- [window updateColorSpace];
});
[pool release];
@@ -2455,7 +2411,6 @@
OnMainThread(^{
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
- WineWindow* window = (WineWindow*)[view window];
[nc removeObserver:view
name:NSViewGlobalFrameDidChangeNotification
@@ -2465,7 +2420,6 @@
object:NSApp];
[view removeFromSuperview];
[view release];
- [window updateColorSpace];
});
[pool release];
@@ -2490,15 +2444,11 @@
BOOL changedWindow = (window && window != [view window]);
NSRect newFrame = NSRectFromCGRect(rect);
NSRect oldFrame = [view frame];
- BOOL needUpdateWindowColorSpace = FALSE;
if (changedWindow)
{
- WineWindow* oldWindow = (WineWindow*)[view window];
[view removeFromSuperview];
- [oldWindow updateColorSpace];
[[window contentView] addSubview:view];
- needUpdateWindowColorSpace = TRUE;
}
if (!NSEqualRects(oldFrame, newFrame))
@@ -2512,11 +2462,7 @@
else
[view setFrame:newFrame];
[view setNeedsDisplay:YES];
- needUpdateWindowColorSpace = TRUE;
}
-
- if (needUpdateWindowColorSpace)
- [(WineWindow*)[view window] updateColorSpace];
});
[pool release];