Mercurial > sdl-ios-xcode
annotate docs/html/wm.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 >Window Management</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="SDL Reference" | |
14 HREF="reference.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_Overlay" | |
17 HREF="sdloverlay.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_WM_SetCaption" | |
20 HREF="sdlwmsetcaption.html"><META | |
21 NAME="KEYWORD" | |
22 CONTENT="wm"><META | |
23 NAME="KEYWORD" | |
24 CONTENT="function"></HEAD | |
25 ><BODY | |
26 CLASS="CHAPTER" | |
27 BGCOLOR="#FFF8DC" | |
28 TEXT="#000000" | |
29 LINK="#0000ee" | |
30 VLINK="#551a8b" | |
31 ALINK="#ff0000" | |
32 ><DIV | |
33 CLASS="NAVHEADER" | |
34 ><TABLE | |
35 WIDTH="100%" | |
36 BORDER="0" | |
37 CELLPADDING="0" | |
38 CELLSPACING="0" | |
39 ><TR | |
40 ><TH | |
41 COLSPAN="3" | |
42 ALIGN="center" | |
43 >SDL Library Documentation</TH | |
44 ></TR | |
45 ><TR | |
46 ><TD | |
47 WIDTH="10%" | |
48 ALIGN="left" | |
49 VALIGN="bottom" | |
50 ><A | |
51 HREF="sdloverlay.html" | |
52 >Prev</A | |
53 ></TD | |
54 ><TD | |
55 WIDTH="80%" | |
56 ALIGN="center" | |
57 VALIGN="bottom" | |
58 ></TD | |
59 ><TD | |
60 WIDTH="10%" | |
61 ALIGN="right" | |
62 VALIGN="bottom" | |
63 ><A | |
64 HREF="sdlwmsetcaption.html" | |
65 >Next</A | |
66 ></TD | |
67 ></TR | |
68 ></TABLE | |
69 ><HR | |
70 ALIGN="LEFT" | |
71 WIDTH="100%"></DIV | |
72 ><DIV | |
73 CLASS="CHAPTER" | |
74 ><H1 | |
75 ><A | |
76 NAME="WM" | |
77 >Chapter 7. Window Management</A | |
78 ></H1 | |
79 ><DIV | |
80 CLASS="TOC" | |
81 ><DL | |
82 ><DT | |
83 ><B | |
84 >Table of Contents</B | |
85 ></DT | |
86 ><DT | |
87 ><A | |
88 HREF="sdlwmsetcaption.html" | |
89 >SDL_WM_SetCaption</A | |
90 > — Sets the window tile and icon name.</DT | |
91 ><DT | |
92 ><A | |
93 HREF="sdlwmgetcaption.html" | |
94 >SDL_WM_GetCaption</A | |
95 > — Gets the window title and icon name.</DT | |
96 ><DT | |
97 ><A | |
98 HREF="sdlwmseticon.html" | |
99 >SDL_WM_SetIcon</A | |
100 > — Sets the icon for the display window.</DT | |
101 ><DT | |
102 ><A | |
103 HREF="sdlwmiconifywindow.html" | |
104 >SDL_WM_IconifyWindow</A | |
105 > — Iconify/Minimise the window</DT | |
106 ><DT | |
107 ><A | |
108 HREF="sdlwmtogglefullscreen.html" | |
109 >SDL_WM_ToggleFullScreen</A | |
110 > — Toggles fullscreen mode</DT | |
111 ><DT | |
112 ><A | |
113 HREF="sdlwmgrabinput.html" | |
114 >SDL_WM_GrabInput</A | |
115 > — Grabs mouse and keyboard input.</DT | |
116 ></DL | |
117 ></DIV | |
118 ><P | |
119 >SDL provides a small set of window management functions which allow applications to change their title and toggle from windowed mode to fullscreen (if available)</P | |
120 ></DIV | |
121 ><DIV | |
122 CLASS="NAVFOOTER" | |
123 ><HR | |
124 ALIGN="LEFT" | |
125 WIDTH="100%"><TABLE | |
126 WIDTH="100%" | |
127 BORDER="0" | |
128 CELLPADDING="0" | |
129 CELLSPACING="0" | |
130 ><TR | |
131 ><TD | |
132 WIDTH="33%" | |
133 ALIGN="left" | |
134 VALIGN="top" | |
135 ><A | |
136 HREF="sdloverlay.html" | |
137 >Prev</A | |
138 ></TD | |
139 ><TD | |
140 WIDTH="34%" | |
141 ALIGN="center" | |
142 VALIGN="top" | |
143 ><A | |
144 HREF="index.html" | |
145 >Home</A | |
146 ></TD | |
147 ><TD | |
148 WIDTH="33%" | |
149 ALIGN="right" | |
150 VALIGN="top" | |
151 ><A | |
152 HREF="sdlwmsetcaption.html" | |
153 >Next</A | |
154 ></TD | |
155 ></TR | |
156 ><TR | |
157 ><TD | |
158 WIDTH="33%" | |
159 ALIGN="left" | |
160 VALIGN="top" | |
161 >SDL_Overlay</TD | |
162 ><TD | |
163 WIDTH="34%" | |
164 ALIGN="center" | |
165 VALIGN="top" | |
166 ><A | |
167 HREF="reference.html" | |
168 >Up</A | |
169 ></TD | |
170 ><TD | |
171 WIDTH="33%" | |
172 ALIGN="right" | |
173 VALIGN="top" | |
174 >SDL_WM_SetCaption</TD | |
175 ></TR | |
176 ></TABLE | |
177 ></DIV | |
178 ></BODY | |
179 ></HTML | |
180 > |