Mercurial > sdl-ios-xcode
annotate docs/html/sdlquitsubsystem.html @ 615:7ec821f3cbd0
Date: Thu, 17 Apr 2003 23:27:34 -0400
From: Darrell Walisser
Subject: Yet another OS X cursor bug
The synopsis:
1. Call SDL_ShowCursor(0);
2. Call SDL_SetVideoMode();
3. Call SDL_GetEvent();
3. Call SDL_ShowCursor(1);
The result: Sometimes the cursor doesn't come back! Ack! Oddly enough,
it does come back when mousing over the dock or clicking in the menu
bar. But that's besides the point.
The reason why this is happening is a flaw in the handling of
activation/deactivation events. The short explanation is that the
HideCursor() and ShowCursor() calls must be balanced, but if the cursor
was initially hidden, HideCursor() was called again on the activate
event - so now the next ShowCursor() fails (as does the next, and the
next, for some reason).
So, here's the patch. All it does is keep track of the
HideCursor()/ShowCursor() calls so that they will always be balanced.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 20 Apr 2003 05:41:16 +0000 |
parents | 55f1f1b3e27d |
children | 355632dca928 |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_QuitSubSystem</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="General" | |
14 HREF="general.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_InitSubSystem" | |
17 HREF="sdlinitsubsystem.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_Quit" | |
20 HREF="sdlquit.html"></HEAD | |
21 ><BODY | |
22 CLASS="REFENTRY" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
31 WIDTH="100%" | |
32 BORDER="0" | |
33 CELLPADDING="0" | |
34 CELLSPACING="0" | |
35 ><TR | |
36 ><TH | |
37 COLSPAN="3" | |
38 ALIGN="center" | |
39 >SDL Library Documentation</TH | |
40 ></TR | |
41 ><TR | |
42 ><TD | |
43 WIDTH="10%" | |
44 ALIGN="left" | |
45 VALIGN="bottom" | |
46 ><A | |
47 HREF="sdlinitsubsystem.html" | |
48 >Prev</A | |
49 ></TD | |
50 ><TD | |
51 WIDTH="80%" | |
52 ALIGN="center" | |
53 VALIGN="bottom" | |
54 ></TD | |
55 ><TD | |
56 WIDTH="10%" | |
57 ALIGN="right" | |
58 VALIGN="bottom" | |
59 ><A | |
60 HREF="sdlquit.html" | |
61 >Next</A | |
62 ></TD | |
63 ></TR | |
64 ></TABLE | |
65 ><HR | |
66 ALIGN="LEFT" | |
67 WIDTH="100%"></DIV | |
68 ><H1 | |
69 ><A | |
70 NAME="SDLQUITSUBSYSTEM" | |
71 >SDL_QuitSubSystem</A | |
72 ></H1 | |
73 ><DIV | |
74 CLASS="REFNAMEDIV" | |
75 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
76 NAME="AEN550" |
0 | 77 ></A |
78 ><H2 | |
79 >Name</H2 | |
80 >SDL_QuitSubSystem -- Shut down a subsystem</DIV | |
81 ><DIV | |
82 CLASS="REFSYNOPSISDIV" | |
83 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
84 NAME="AEN553" |
0 | 85 ></A |
86 ><H2 | |
87 >Synopsis</H2 | |
88 ><DIV | |
89 CLASS="FUNCSYNOPSIS" | |
90 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
91 NAME="AEN554" |
0 | 92 ></A |
93 ><P | |
94 ></P | |
95 ><PRE | |
96 CLASS="FUNCSYNOPSISINFO" | |
97 >#include "SDL.h"</PRE | |
98 ><P | |
99 ><CODE | |
100 ><CODE | |
101 CLASS="FUNCDEF" | |
102 >void <B | |
103 CLASS="FSFUNC" | |
104 >SDL_QuitSubSystem</B | |
105 ></CODE | |
106 >(Uint32 flags);</CODE | |
107 ></P | |
108 ><P | |
109 ></P | |
110 ></DIV | |
111 ></DIV | |
112 ><DIV | |
113 CLASS="REFSECT1" | |
114 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
115 NAME="AEN560" |
0 | 116 ></A |
117 ><H2 | |
118 >Description</H2 | |
119 ><P | |
120 ><TT | |
121 CLASS="FUNCTION" | |
122 >SDL_QuitSubSystem</TT | |
123 > allows you to shut down a subsystem that has been previously initialized by <A | |
124 HREF="sdlinit.html" | |
125 ><TT | |
126 CLASS="FUNCTION" | |
127 >SDL_Init</TT | |
128 ></A | |
129 > or <A | |
130 HREF="sdlinitsubsystem.html" | |
131 ><TT | |
132 CLASS="FUNCTION" | |
133 >SDL_InitSubSystem</TT | |
134 ></A | |
135 >. The <TT | |
136 CLASS="PARAMETER" | |
137 ><I | |
138 >flags</I | |
139 ></TT | |
140 > tells <TT | |
141 CLASS="FUNCTION" | |
142 >SDL_QuitSubSystem</TT | |
143 > which subsystems to shut down, it uses the same values that are passed to <A | |
144 HREF="sdlinit.html" | |
145 ><TT | |
146 CLASS="FUNCTION" | |
147 >SDL_Init</TT | |
148 ></A | |
149 >.</P | |
150 ></DIV | |
151 ><DIV | |
152 CLASS="REFSECT1" | |
153 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
154 NAME="AEN572" |
0 | 155 ></A |
156 ><H2 | |
157 >See Also</H2 | |
158 ><P | |
159 ><A | |
160 HREF="sdlquit.html" | |
161 ><TT | |
162 CLASS="FUNCTION" | |
163 >SDL_Quit</TT | |
164 ></A | |
165 >, | |
166 <A | |
167 HREF="sdlinit.html" | |
168 ><TT | |
169 CLASS="FUNCTION" | |
170 >SDL_Init</TT | |
171 ></A | |
172 >, | |
173 <A | |
174 HREF="sdlinitsubsystem.html" | |
175 ><TT | |
176 CLASS="FUNCTION" | |
177 >SDL_InitSubSystem</TT | |
178 ></A | |
179 ></P | |
180 ></DIV | |
181 ><DIV | |
182 CLASS="NAVFOOTER" | |
183 ><HR | |
184 ALIGN="LEFT" | |
185 WIDTH="100%"><TABLE | |
186 WIDTH="100%" | |
187 BORDER="0" | |
188 CELLPADDING="0" | |
189 CELLSPACING="0" | |
190 ><TR | |
191 ><TD | |
192 WIDTH="33%" | |
193 ALIGN="left" | |
194 VALIGN="top" | |
195 ><A | |
196 HREF="sdlinitsubsystem.html" | |
197 >Prev</A | |
198 ></TD | |
199 ><TD | |
200 WIDTH="34%" | |
201 ALIGN="center" | |
202 VALIGN="top" | |
203 ><A | |
204 HREF="index.html" | |
205 >Home</A | |
206 ></TD | |
207 ><TD | |
208 WIDTH="33%" | |
209 ALIGN="right" | |
210 VALIGN="top" | |
211 ><A | |
212 HREF="sdlquit.html" | |
213 >Next</A | |
214 ></TD | |
215 ></TR | |
216 ><TR | |
217 ><TD | |
218 WIDTH="33%" | |
219 ALIGN="left" | |
220 VALIGN="top" | |
221 >SDL_InitSubSystem</TD | |
222 ><TD | |
223 WIDTH="34%" | |
224 ALIGN="center" | |
225 VALIGN="top" | |
226 ><A | |
227 HREF="general.html" | |
228 >Up</A | |
229 ></TD | |
230 ><TD | |
231 WIDTH="33%" | |
232 ALIGN="right" | |
233 VALIGN="top" | |
234 >SDL_Quit</TD | |
235 ></TR | |
236 ></TABLE | |
237 ></DIV | |
238 ></BODY | |
239 ></HTML | |
240 > |