Replace client area with content area.
This commit is contained in:
Camilla Löwy 2019-01-22 20:54:16 +01:00
parent a46104ee69
commit d5ab3e919a
12 changed files with 191 additions and 186 deletions

View File

@ -248,7 +248,7 @@ glfwSetCursorPosCallback(window, cursor_position_callback);
@endcode @endcode
The callback functions receives the cursor position, measured in screen The callback functions receives the cursor position, measured in screen
coordinates but relative to the top-left corner of the window client area. On coordinates but relative to the top-left corner of the window content area. On
platforms that provide it, the full sub-pixel cursor position is passed on. platforms that provide it, the full sub-pixel cursor position is passed on.
@code @code
@ -377,7 +377,7 @@ glfwSetCursor(window, cursor);
@endcode @endcode
Once set, the cursor image will be used as long as the system cursor is over the Once set, the cursor image will be used as long as the system cursor is over the
client area of the window and the [cursor mode](@ref cursor_mode) is set content area of the window and the [cursor mode](@ref cursor_mode) is set
to `GLFW_CURSOR_NORMAL`. to `GLFW_CURSOR_NORMAL`.
A single cursor may be set for any number of windows. A single cursor may be set for any number of windows.
@ -394,7 +394,7 @@ default cursor. This does not affect the cursor mode.
@subsection cursor_enter Cursor enter/leave events @subsection cursor_enter Cursor enter/leave events
If you wish to be notified when the cursor enters or leaves the client area of If you wish to be notified when the cursor enters or leaves the content area of
a window, set a cursor enter/leave callback. a window, set a cursor enter/leave callback.
@code @code
@ -408,16 +408,16 @@ void cursor_enter_callback(GLFWwindow* window, int entered)
{ {
if (entered) if (entered)
{ {
// The cursor entered the client area of the window // The cursor entered the content area of the window
} }
else else
{ {
// The cursor left the client area of the window // The cursor left the content area of the window
} }
} }
@endcode @endcode
You can query whether the cursor is currently inside the client area of the You can query whether the cursor is currently inside the content area of the
window with the [GLFW_HOVERED](@ref GLFW_HOVERED_attrib) window attribute. window with the [GLFW_HOVERED](@ref GLFW_HOVERED_attrib) window attribute.
@code @code

View File

@ -208,24 +208,24 @@ future that same call may generate a different error or become valid.
@section coordinate_systems Coordinate systems @section coordinate_systems Coordinate systems
GLFW has two primary coordinate systems: the _virtual screen_ and the window GLFW has two primary coordinate systems: the _virtual screen_ and the window
_client area_ or _content area_. Both use the same unit: _virtual screen _content area_ or _content area_. Both use the same unit: _virtual screen
coordinates_, or just _screen coordinates_, which don't necessarily correspond coordinates_, or just _screen coordinates_, which don't necessarily correspond
to pixels. to pixels.
<img src="spaces.svg" width="90%" /> <img src="spaces.svg" width="90%" />
Both the virtual screen and the client area coordinate systems have the X-axis Both the virtual screen and the content area coordinate systems have the X-axis
pointing to the right and the Y-axis pointing down. pointing to the right and the Y-axis pointing down.
Window and monitor positions are specified as the position of the upper-left Window and monitor positions are specified as the position of the upper-left
corners of their content areas relative to the virtual screen, while cursor corners of their content areas relative to the virtual screen, while cursor
positions are specified relative to a window's client area. positions are specified relative to a window's content area.
Because the origin of the window's client area coordinate system is also the Because the origin of the window's content area coordinate system is also the
point from which the window position is specified, you can translate client area point from which the window position is specified, you can translate content
coordinates to the virtual screen by adding the window position. The window area coordinates to the virtual screen by adding the window position. The
frame, when present, extends out from the client area but does not affect the window frame, when present, extends out from the content area but does not
window position. affect the window position.
Almost all positions and sizes in GLFW are measured in screen coordinates Almost all positions and sizes in GLFW are measured in screen coordinates
relative to one of the two origins above. This includes cursor positions, relative to one of the two origins above. This includes cursor positions,

View File

@ -128,7 +128,7 @@ window hint. It is enabled by default.
@subsection news_33_hover Mouse cursor hover window attribute @subsection news_33_hover Mouse cursor hover window attribute
GLFW now supports polling whether the cursor is hovering over the window client GLFW now supports polling whether the cursor is hovering over the window content
area with the [GLFW_HOVERED](@ref GLFW_HOVERED_attrib) window attribute. This area with the [GLFW_HOVERED](@ref GLFW_HOVERED_attrib) window attribute. This
attribute corresponds to the [cursor enter/leave](@ref cursor_enter) event. attribute corresponds to the [cursor enter/leave](@ref cursor_enter) event.
@ -308,7 +308,7 @@ glfwWaitEvents to return.
@subsection news_31_framesize Window frame size query @subsection news_31_framesize Window frame size query
GLFW now supports querying the size, on each side, of the frame around the GLFW now supports querying the size, on each side, of the frame around the
client area of a window, with @ref glfwGetWindowFrameSize. content area of a window, with @ref glfwGetWindowFrameSize.
@see [Window size](@ref window_size) @see [Window size](@ref window_size)
@ -506,7 +506,7 @@ glfwSetWindowFocusCallback.
@subsection news_30_enterleave Cursor enter/leave callback @subsection news_30_enterleave Cursor enter/leave callback
Each window now has a callback for when the mouse cursor enters or leaves its Each window now has a callback for when the mouse cursor enters or leaves its
client area, which is set with @ref glfwSetCursorEnterCallback. content area, which is set with @ref glfwSetCursorEnterCallback.
@subsection news_30_wndtitle Initial window title @subsection news_30_wndtitle Initial window title

View File

@ -13,7 +13,7 @@
height="327.98221" height="327.98221"
id="svg2" id="svg2"
version="1.1" version="1.1"
inkscape:version="0.48.4 r9939" inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="spaces.svg"> sodipodi:docname="spaces.svg">
<defs <defs
id="defs4"> id="defs4">
@ -38,11 +38,11 @@
borderopacity="1.0" borderopacity="1.0"
inkscape:pageopacity="0.0" inkscape:pageopacity="0.0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:zoom="2.5611424" inkscape:zoom="1.8110012"
inkscape:cx="344.24359" inkscape:cx="320.68941"
inkscape:cy="163.9911" inkscape:cy="159.80509"
inkscape:document-units="px" inkscape:document-units="px"
inkscape:current-layer="svg2" inkscape:current-layer="layer1"
showgrid="false" showgrid="false"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-height="1021" inkscape:window-height="1021"
@ -475,18 +475,18 @@
inkscape:export-ydpi="109.89113" /> inkscape:export-ydpi="109.89113" />
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="21.213203" x="21.213203"
y="340.20465" y="340.20465"
id="text3803" id="text3803"
sodipodi:linespacing="125%"
inkscape:export-filename="/home/elmindreda/projects/glfw/glfw/docs/spaces.png" inkscape:export-filename="/home/elmindreda/projects/glfw/glfw/docs/spaces.png"
inkscape:export-xdpi="109.89113" inkscape:export-xdpi="109.89113"
inkscape:export-ydpi="109.89113"><tspan inkscape:export-ydpi="109.89113"><tspan
sodipodi:role="line" sodipodi:role="line"
id="tspan3805" id="tspan3805"
x="21.213203" x="21.213203"
y="340.20465" /></text> y="340.20465"
style="font-size:12px;line-height:1.25;font-family:sans-serif"> </tspan></text>
<g <g
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="text3807"> id="text3807">
@ -647,74 +647,6 @@
style="font-size:10px" style="font-size:10px"
id="path3239" /> id="path3239" />
</g> </g>
<g
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="text3826">
<path
d="m 172.22728,456.1171 0,1.04004 c -0.33204,-0.30924 -0.68686,-0.54036 -1.06445,-0.69336 -0.37436,-0.15299 -0.77312,-0.22949 -1.19629,-0.2295 -0.83334,10e-6 -1.47136,0.25554 -1.91407,0.76661 -0.44271,0.50781 -0.66406,1.24349 -0.66406,2.20703 0,0.96029 0.22135,1.69596 0.66406,2.20703 0.44271,0.50781 1.08073,0.76172 1.91407,0.76172 0.42317,0 0.82193,-0.0765 1.19629,-0.2295 0.37759,-0.15299 0.73241,-0.38411 1.06445,-0.69336 l 0,1.03028 c -0.34506,0.23437 -0.71127,0.41015 -1.09863,0.52734 -0.38412,0.11719 -0.79102,0.17578 -1.22071,0.17578 -1.10351,0 -1.97265,-0.33691 -2.60742,-1.01074 -0.63476,-0.67708 -0.95215,-1.59993 -0.95215,-2.76855 0,-1.17187 0.31739,-2.09472 0.95215,-2.76856 0.63477,-0.67707 1.50391,-1.01562 2.60742,-1.01562 0.4362,0 0.84635,0.0586 1.23047,0.17578 0.38737,0.11394 0.75032,0.28646 1.08887,0.51758"
style="font-size:10px"
id="path3108" />
<path
d="m 173.72142,455.24796 0.89844,0 0,7.59765 -0.89844,0 0,-7.59765"
style="font-size:10px"
id="path3110" />
<path
d="m 176.49486,457.37686 0.89844,0 0,5.46875 -0.89844,0 0,-5.46875 m 0,-2.1289 0.89844,0 0,1.13769 -0.89844,0 0,-1.13769"
style="font-size:10px"
id="path3112" />
<path
d="m 183.94603,459.88663 0,0.43945 -4.13086,0 c 0.0391,0.61849 0.22461,1.0905 0.55664,1.41602 0.33528,0.32226 0.80078,0.4834 1.39649,0.48339 0.34504,1e-5 0.6787,-0.0423 1.00097,-0.12695 0.32552,-0.0846 0.64778,-0.21159 0.9668,-0.38086 l 0,0.84961 c -0.32227,0.13672 -0.65268,0.24089 -0.99121,0.3125 -0.33855,0.0716 -0.68197,0.10742 -1.03028,0.10742 -0.87239,0 -1.56413,-0.2539 -2.07519,-0.76172 -0.50781,-0.50781 -0.76172,-1.19466 -0.76172,-2.06054 0,-0.89518 0.24088,-1.60482 0.72266,-2.12891 0.48502,-0.52734 1.13769,-0.79101 1.958,-0.79101 0.73568,0 1.31673,0.23763 1.74317,0.71289 0.42968,0.47201 0.64452,1.11491 0.64453,1.92871 m -0.89844,-0.26367 c -0.007,-0.49154 -0.14486,-0.88379 -0.41504,-1.17676 -0.26693,-0.29297 -0.62175,-0.43945 -1.06445,-0.43946 -0.5013,1e-5 -0.90332,0.14161 -1.20605,0.42481 -0.29949,0.28321 -0.47201,0.68197 -0.51758,1.19629 l 3.20312,-0.005"
style="font-size:10px"
id="path3114" />
<path
d="m 189.96654,459.54483 0,3.30078 -0.89844,0 0,-3.27148 c 0,-0.51758 -0.10092,-0.90495 -0.30273,-1.16211 -0.20183,-0.25716 -0.50457,-0.38574 -0.90821,-0.38574 -0.48503,0 -0.86751,0.15462 -1.14746,0.46386 -0.27995,0.30925 -0.41992,0.7308 -0.41992,1.26465 l 0,3.09082 -0.90332,0 0,-5.46875 0.90332,0 0,0.84961 c 0.21484,-0.32877 0.46712,-0.57454 0.75684,-0.7373 0.29296,-0.16276 0.62988,-0.24414 1.01074,-0.24414 0.62825,0 1.10351,0.19531 1.42578,0.58593 0.32226,0.38738 0.48339,0.95867 0.4834,1.71387"
style="font-size:10px"
id="path3116" />
<path
d="m 192.65697,455.82413 0,1.55273 1.85058,0 0,0.69824 -1.85058,0 0,2.96875 c 0,0.44597 0.0602,0.73243 0.18066,0.85938 0.1237,0.12695 0.37272,0.19043 0.74707,0.19043 l 0.92285,0 0,0.75195 -0.92285,0 c -0.69336,0 -1.17188,-0.12858 -1.43555,-0.38574 -0.26367,-0.26042 -0.3955,-0.73242 -0.3955,-1.41602 l 0,-2.96875 -0.65918,0 0,-0.69824 0.65918,0 0,-1.55273 0.90332,0"
style="font-size:10px"
id="path3118" />
<path
d="m 201.36302,460.09659 c -0.72591,0 -1.22884,0.083 -1.50879,0.24902 -0.27995,0.16602 -0.41992,0.44922 -0.41992,0.84961 0,0.31901 0.10417,0.57292 0.3125,0.76172 0.21159,0.18555 0.49805,0.27832 0.85938,0.27832 0.49804,0 0.8968,-0.17578 1.19628,-0.52734 0.30274,-0.35482 0.4541,-0.8252 0.45411,-1.41114 l 0,-0.20019 -0.89356,0 m 1.79199,-0.3711 0,3.12012 -0.89843,0 0,-0.83008 c -0.20509,0.33204 -0.46062,0.5778 -0.76661,0.73731 -0.30599,0.15625 -0.68034,0.23437 -1.12304,0.23437 -0.5599,0 -1.00586,-0.15625 -1.33789,-0.46875 -0.32878,-0.31575 -0.49317,-0.7373 -0.49317,-1.26465 0,-0.61523 0.20508,-1.07909 0.61524,-1.3916 0.41341,-0.31249 1.02864,-0.46874 1.8457,-0.46875 l 1.25977,0 0,-0.0879 c -1e-5,-0.4134 -0.13673,-0.73242 -0.41016,-0.95703 -0.27019,-0.22786 -0.65104,-0.34179 -1.14258,-0.3418 -0.3125,1e-5 -0.61686,0.0374 -0.91308,0.11231 -0.29623,0.0749 -0.58106,0.18718 -0.8545,0.33691 l 0,-0.83007 c 0.32878,-0.12695 0.64779,-0.22135 0.95704,-0.28321 0.30924,-0.0651 0.61034,-0.0976 0.90332,-0.0976 0.79101,0 1.38183,0.20508 1.77246,0.61523 0.39062,0.41016 0.58593,1.03191 0.58593,1.86523"
style="font-size:10px"
id="path3120" />
<path
d="m 208.17943,458.21671 c -0.10092,-0.0586 -0.21159,-0.10091 -0.33203,-0.12696 -0.11719,-0.0293 -0.2474,-0.0439 -0.39063,-0.0439 -0.50781,0 -0.89844,0.16602 -1.17187,0.49804 -0.27019,0.32878 -0.40528,0.80242 -0.40528,1.4209 l 0,2.88086 -0.90332,0 0,-5.46875 0.90332,0 0,0.84961 c 0.1888,-0.33203 0.43457,-0.57779 0.73731,-0.7373 0.30273,-0.16276 0.67057,-0.24414 1.10351,-0.24414 0.0618,0 0.13021,0.005 0.20508,0.0146 0.0749,0.007 0.15788,0.0179 0.24903,0.0342 l 0.005,0.92286"
style="font-size:10px"
id="path3122" />
<path
d="m 213.59447,459.88663 0,0.43945 -4.13086,0 c 0.0391,0.61849 0.22461,1.0905 0.55664,1.41602 0.33528,0.32226 0.80078,0.4834 1.39648,0.48339 0.34505,1e-5 0.67871,-0.0423 1.00098,-0.12695 0.32552,-0.0846 0.64778,-0.21159 0.9668,-0.38086 l 0,0.84961 c -0.32227,0.13672 -0.65268,0.24089 -0.99121,0.3125 -0.33855,0.0716 -0.68197,0.10742 -1.03028,0.10742 -0.8724,0 -1.56413,-0.2539 -2.07519,-0.76172 -0.50782,-0.50781 -0.76172,-1.19466 -0.76172,-2.06054 0,-0.89518 0.24088,-1.60482 0.72265,-2.12891 0.48503,-0.52734 1.1377,-0.79101 1.95801,-0.79101 0.73567,0 1.31673,0.23763 1.74317,0.71289 0.42968,0.47201 0.64452,1.11491 0.64453,1.92871 m -0.89844,-0.26367 c -0.007,-0.49154 -0.14486,-0.88379 -0.41504,-1.17676 -0.26693,-0.29297 -0.62175,-0.43945 -1.06445,-0.43946 -0.50131,1e-5 -0.90333,0.14161 -1.20606,0.42481 -0.29948,0.28321 -0.472,0.68197 -0.51758,1.19629 l 3.20313,-0.005"
style="font-size:10px"
id="path3124" />
<path
d="m 217.55443,460.09659 c -0.72592,0 -1.22885,0.083 -1.50879,0.24902 -0.27995,0.16602 -0.41992,0.44922 -0.41992,0.84961 0,0.31901 0.10416,0.57292 0.3125,0.76172 0.21158,0.18555 0.49804,0.27832 0.85937,0.27832 0.49805,0 0.89681,-0.17578 1.19629,-0.52734 0.30273,-0.35482 0.4541,-0.8252 0.4541,-1.41114 l 0,-0.20019 -0.89355,0 m 1.79199,-0.3711 0,3.12012 -0.89844,0 0,-0.83008 c -0.20508,0.33204 -0.46061,0.5778 -0.7666,0.73731 -0.30599,0.15625 -0.68034,0.23437 -1.12305,0.23437 -0.55989,0 -1.00586,-0.15625 -1.33789,-0.46875 -0.32877,-0.31575 -0.49316,-0.7373 -0.49316,-1.26465 0,-0.61523 0.20508,-1.07909 0.61523,-1.3916 0.41341,-0.31249 1.02865,-0.46874 1.84571,-0.46875 l 1.25976,0 0,-0.0879 c 0,-0.4134 -0.13672,-0.73242 -0.41015,-0.95703 -0.27019,-0.22786 -0.65105,-0.34179 -1.14258,-0.3418 -0.3125,1e-5 -0.61687,0.0374 -0.91309,0.11231 -0.29622,0.0749 -0.58105,0.18718 -0.85449,0.33691 l 0,-0.83007 c 0.32877,-0.12695 0.64779,-0.22135 0.95703,-0.28321 0.30924,-0.0651 0.61035,-0.0976 0.90332,-0.0976 0.79101,0 1.38183,0.20508 1.77246,0.61523 0.39062,0.41016 0.58594,1.03191 0.58594,1.86523"
style="font-size:10px"
id="path3126" />
<path
d="m 226.50462,458.00674 c -0.48177,1e-5 -0.86263,0.18881 -1.14257,0.56641 -0.27995,0.37435 -0.41993,0.88868 -0.41993,1.54297 0,0.6543 0.13835,1.17025 0.41504,1.54785 0.27995,0.37435 0.66243,0.56153 1.14746,0.56152 0.47852,1e-5 0.85775,-0.1888 1.1377,-0.5664 0.27994,-0.3776 0.41992,-0.89193 0.41992,-1.54297 0,-0.64778 -0.13998,-1.16048 -0.41992,-1.53809 -0.27995,-0.38085 -0.65918,-0.57128 -1.1377,-0.57129 m 0,-0.76171 c 0.78125,0 1.39486,0.25391 1.84082,0.76171 0.44596,0.50782 0.66894,1.21095 0.66895,2.10938 -1e-5,0.89518 -0.22299,1.59831 -0.66895,2.10937 -0.44596,0.50782 -1.05957,0.76172 -1.84082,0.76172 -0.7845,0 -1.39974,-0.2539 -1.8457,-0.76172 -0.44271,-0.51106 -0.66406,-1.21419 -0.66406,-2.10937 0,-0.89843 0.22135,-1.60156 0.66406,-2.10938 0.44596,-0.5078 1.0612,-0.76171 1.8457,-0.76171"
style="font-size:10px"
id="path3128" />
<path
d="m 233.66771,458.21671 c -0.10092,-0.0586 -0.21159,-0.10091 -0.33203,-0.12696 -0.11719,-0.0293 -0.2474,-0.0439 -0.39063,-0.0439 -0.50781,0 -0.89844,0.16602 -1.17187,0.49804 -0.27019,0.32878 -0.40528,0.80242 -0.40528,1.4209 l 0,2.88086 -0.90332,0 0,-5.46875 0.90332,0 0,0.84961 c 0.1888,-0.33203 0.43457,-0.57779 0.73731,-0.7373 0.30273,-0.16276 0.67057,-0.24414 1.10351,-0.24414 0.0618,0 0.13021,0.005 0.20508,0.0146 0.0749,0.007 0.15788,0.0179 0.24903,0.0342 l 0.005,0.92286"
style="font-size:10px"
id="path3130" />
<path
d="m 234.61986,457.37686 0.89844,0 0,5.46875 -0.89844,0 0,-5.46875 m 0,-2.1289 0.89844,0 0,1.13769 -0.89844,0 0,-1.13769"
style="font-size:10px"
id="path3132" />
<path
d="m 240.99193,460.04776 c -1e-5,-0.65104 -0.1351,-1.15559 -0.40528,-1.51367 -0.26693,-0.35807 -0.6429,-0.53711 -1.12793,-0.53711 -0.48177,0 -0.85774,0.17904 -1.12792,0.53711 -0.26693,0.35808 -0.4004,0.86263 -0.4004,1.51367 0,0.64779 0.13347,1.15072 0.4004,1.50879 0.27018,0.35807 0.64615,0.53711 1.12792,0.53711 0.48503,0 0.861,-0.17904 1.12793,-0.53711 0.27018,-0.35807 0.40527,-0.861 0.40528,-1.50879 m 0.89844,2.11914 c -1e-5,0.93099 -0.20672,1.62272 -0.62012,2.0752 -0.41342,0.45572 -1.04655,0.68359 -1.89942,0.68359 -0.31575,0 -0.6136,-0.0244 -0.89355,-0.0732 -0.27995,-0.0456 -0.55176,-0.11719 -0.81543,-0.21485 l 0,-0.87402 c 0.26367,0.14323 0.52409,0.24902 0.78125,0.31738 0.25716,0.0684 0.5192,0.10254 0.78613,0.10254 0.58919,0 1.03027,-0.15462 1.32324,-0.46386 0.29297,-0.306 0.43945,-0.76986 0.43946,-1.39161 l 0,-0.44433 c -0.18555,0.32226 -0.42318,0.56315 -0.71289,0.72265 -0.28972,0.15951 -0.6364,0.23926 -1.04004,0.23926 -0.67058,0 -1.21094,-0.25553 -1.6211,-0.7666 -0.41015,-0.51107 -0.61523,-1.18815 -0.61523,-2.03125 0,-0.84635 0.20508,-1.52506 0.61523,-2.03613 0.41016,-0.51107 0.95052,-0.7666 1.6211,-0.7666 0.40364,0 0.75032,0.0797 1.04004,0.23925 0.28971,0.15951 0.52734,0.4004 0.71289,0.72266 l 0,-0.83008 0.89844,0 0,4.79004"
style="font-size:10px"
id="path3134" />
<path
d="m 243.74095,457.37686 0.89844,0 0,5.46875 -0.89844,0 0,-5.46875 m 0,-2.1289 0.89844,0 0,1.13769 -0.89844,0 0,-1.13769"
style="font-size:10px"
id="path3136" />
<path
d="m 251.06029,459.54483 0,3.30078 -0.89844,0 0,-3.27148 c 0,-0.51758 -0.10092,-0.90495 -0.30273,-1.16211 -0.20183,-0.25716 -0.50457,-0.38574 -0.90821,-0.38574 -0.48503,0 -0.86751,0.15462 -1.14746,0.46386 -0.27995,0.30925 -0.41992,0.7308 -0.41992,1.26465 l 0,3.09082 -0.90332,0 0,-5.46875 0.90332,0 0,0.84961 c 0.21484,-0.32877 0.46712,-0.57454 0.75684,-0.7373 0.29296,-0.16276 0.62988,-0.24414 1.01074,-0.24414 0.62825,0 1.10351,0.19531 1.42578,0.58593 0.32226,0.38738 0.48339,0.95867 0.4834,1.71387"
style="font-size:10px"
id="path3138" />
</g>
<g <g
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="text3017"> id="text3017">
@ -868,5 +800,78 @@
style="font-size:5px" style="font-size:5px"
id="path3161" /> id="path3161" />
</g> </g>
<g
aria-label="Content area origin"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
id="text4089">
<path
d="m 172.21587,456.09125 v 1.04004 q -0.49805,-0.46387 -1.06446,-0.69336 -0.56152,-0.22949 -1.19629,-0.22949 -1.25,0 -1.91406,0.7666 -0.66406,0.76172 -0.66406,2.20703 0,1.44043 0.66406,2.20703 0.66406,0.76172 1.91406,0.76172 0.63477,0 1.19629,-0.22949 0.56641,-0.2295 1.06446,-0.69336 v 1.03027 q -0.51758,0.35156 -1.09864,0.52734 -0.57617,0.17578 -1.2207,0.17578 -1.65527,0 -2.60742,-1.01074 -0.95215,-1.01562 -0.95215,-2.76855 0,-1.75781 0.95215,-2.76856 0.95215,-1.01562 2.60742,-1.01562 0.6543,0 1.23047,0.17578 0.58105,0.1709 1.08887,0.51758 z"
style="font-size:10px"
id="path4091" />
<path
d="m 175.82915,457.9809 q -0.72266,0 -1.14258,0.5664 -0.41992,0.56153 -0.41992,1.54297 0,0.98145 0.41504,1.54785 0.41992,0.56153 1.14746,0.56153 0.71777,0 1.13769,-0.56641 0.41992,-0.56641 0.41992,-1.54297 0,-0.97168 -0.41992,-1.53808 -0.41992,-0.57129 -1.13769,-0.57129 z m 0,-0.76172 q 1.17187,0 1.84082,0.76172 0.66894,0.76171 0.66894,2.10937 0,1.34277 -0.66894,2.10938 -0.66895,0.76171 -1.84082,0.76171 -1.17676,0 -1.84571,-0.76171 -0.66406,-0.76661 -0.66406,-2.10938 0,-1.34766 0.66406,-2.10937 0.66895,-0.76172 1.84571,-0.76172 z"
style="font-size:10px"
id="path4093" />
<path
d="m 184.36919,459.51898 v 3.30078 h -0.89844 v -3.27148 q 0,-0.77637 -0.30274,-1.16211 -0.30273,-0.38574 -0.9082,-0.38574 -0.72754,0 -1.14746,0.46386 -0.41992,0.46387 -0.41992,1.26465 v 3.09082 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.32226,-0.49316 0.75683,-0.7373 0.43946,-0.24414 1.01075,-0.24414 0.94238,0 1.42578,0.58593 0.4834,0.58106 0.4834,1.71387 z"
style="font-size:10px"
id="path4095" />
<path
d="m 187.05962,455.79828 v 1.55273 h 1.85058 v 0.69825 h -1.85058 v 2.96875 q 0,0.66894 0.18066,0.85937 0.18555,0.19043 0.74707,0.19043 h 0.92285 v 0.75195 h -0.92285 q -1.04004,0 -1.43555,-0.38574 -0.3955,-0.39062 -0.3955,-1.41601 v -2.96875 h -0.65918 v -0.69825 h 0.65918 v -1.55273 z"
style="font-size:10px"
id="path4097" />
<path
d="m 194.77446,459.86078 v 0.43945 h -4.13086 q 0.0586,0.92774 0.55664,1.41602 0.50293,0.4834 1.39649,0.4834 0.51757,0 1.00097,-0.12696 0.48828,-0.12695 0.9668,-0.38086 v 0.84961 q -0.4834,0.20508 -0.99121,0.3125 -0.50781,0.10742 -1.03028,0.10742 -1.30859,0 -2.07519,-0.76171 -0.76172,-0.76172 -0.76172,-2.06055 0,-1.34277 0.72266,-2.12891 0.72754,-0.79101 1.958,-0.79101 1.10352,0 1.74317,0.71289 0.64453,0.70801 0.64453,1.92871 z m -0.89844,-0.26367 q -0.01,-0.73731 -0.41504,-1.17676 -0.40039,-0.43945 -1.06445,-0.43945 -0.75195,0 -1.20605,0.4248 -0.44922,0.42481 -0.51758,1.19629 z"
style="font-size:10px"
id="path4099" />
<path
d="m 200.79497,459.51898 v 3.30078 h -0.89844 v -3.27148 q 0,-0.77637 -0.30273,-1.16211 -0.30274,-0.38574 -0.90821,-0.38574 -0.72754,0 -1.14746,0.46386 -0.41992,0.46387 -0.41992,1.26465 v 3.09082 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.32227,-0.49316 0.75684,-0.7373 0.43945,-0.24414 1.01074,-0.24414 0.94238,0 1.42578,0.58593 0.4834,0.58106 0.4834,1.71387 z"
style="font-size:10px"
id="path4101" />
<path
d="m 203.4854,455.79828 v 1.55273 h 1.85058 v 0.69825 h -1.85058 v 2.96875 q 0,0.66894 0.18066,0.85937 0.18555,0.19043 0.74707,0.19043 h 0.92285 v 0.75195 h -0.92285 q -1.04004,0 -1.43555,-0.38574 -0.3955,-0.39062 -0.3955,-1.41601 v -2.96875 h -0.65918 v -0.69825 h 0.65918 v -1.55273 z"
style="font-size:10px"
id="path4103" />
<path
d="m 212.19145,460.07074 q -1.08887,0 -1.50879,0.24902 -0.41992,0.24903 -0.41992,0.84961 0,0.47852 0.3125,0.76172 0.31738,0.27832 0.85938,0.27832 0.74707,0 1.19629,-0.52734 0.4541,-0.53223 0.4541,-1.41113 v -0.2002 z m 1.79199,-0.37109 v 3.12011 h -0.89843 v -0.83007 q -0.30762,0.49804 -0.7666,0.7373 -0.45899,0.23437 -1.12305,0.23437 -0.83985,0 -1.33789,-0.46875 -0.49317,-0.47363 -0.49317,-1.26464 0,-0.92286 0.61524,-1.39161 0.62012,-0.46875 1.8457,-0.46875 h 1.25977 v -0.0879 q 0,-0.62011 -0.41016,-0.95703 -0.40527,-0.34179 -1.14258,-0.34179 -0.46875,0 -0.91308,0.1123 -0.44434,0.11231 -0.8545,0.33691 v -0.83007 q 0.49317,-0.19043 0.95704,-0.28321 0.46386,-0.0976 0.90332,-0.0976 1.18652,0 1.77246,0.61523 0.58593,0.61524 0.58593,1.86524 z"
style="font-size:10px"
id="path4105" />
<path
d="m 219.00786,458.19086 q -0.15137,-0.0879 -0.33203,-0.12696 -0.17578,-0.0439 -0.39063,-0.0439 -0.76172,0 -1.17187,0.49805 -0.40528,0.49316 -0.40528,1.42089 v 2.88086 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.28321,-0.49804 0.73731,-0.7373 0.4541,-0.24414 1.10351,-0.24414 0.0928,0 0.20508,0.0147 0.11231,0.01 0.24903,0.0342 z"
style="font-size:10px"
id="path4107" />
<path
d="m 224.4229,459.86078 v 0.43945 h -4.13086 q 0.0586,0.92774 0.55664,1.41602 0.50293,0.4834 1.39648,0.4834 0.51758,0 1.00098,-0.12696 0.48828,-0.12695 0.9668,-0.38086 v 0.84961 q -0.4834,0.20508 -0.99121,0.3125 -0.50782,0.10742 -1.03028,0.10742 -1.30859,0 -2.07519,-0.76171 -0.76172,-0.76172 -0.76172,-2.06055 0,-1.34277 0.72265,-2.12891 0.72754,-0.79101 1.95801,-0.79101 1.10352,0 1.74317,0.71289 0.64453,0.70801 0.64453,1.92871 z m -0.89844,-0.26367 q -0.01,-0.73731 -0.41504,-1.17676 -0.40039,-0.43945 -1.06445,-0.43945 -0.75196,0 -1.20606,0.4248 -0.44922,0.42481 -0.51758,1.19629 z"
style="font-size:10px"
id="path4109" />
<path
d="m 228.38286,460.07074 q -1.08887,0 -1.50879,0.24902 -0.41992,0.24903 -0.41992,0.84961 0,0.47852 0.3125,0.76172 0.31738,0.27832 0.85937,0.27832 0.74707,0 1.19629,-0.52734 0.4541,-0.53223 0.4541,-1.41113 v -0.2002 z m 1.79199,-0.37109 v 3.12011 h -0.89844 v -0.83007 q -0.30761,0.49804 -0.7666,0.7373 -0.45898,0.23437 -1.12305,0.23437 -0.83984,0 -1.33789,-0.46875 -0.49316,-0.47363 -0.49316,-1.26464 0,-0.92286 0.61523,-1.39161 0.62012,-0.46875 1.84571,-0.46875 h 1.25976 v -0.0879 q 0,-0.62011 -0.41015,-0.95703 -0.40528,-0.34179 -1.14258,-0.34179 -0.46875,0 -0.91309,0.1123 -0.44433,0.11231 -0.85449,0.33691 v -0.83007 q 0.49316,-0.19043 0.95703,-0.28321 0.46387,-0.0976 0.90332,-0.0976 1.18653,0 1.77246,0.61523 0.58594,0.61524 0.58594,1.86524 z"
style="font-size:10px"
id="path4111" />
<path
d="m 237.33305,457.9809 q -0.72265,0 -1.14257,0.5664 -0.41993,0.56153 -0.41993,1.54297 0,0.98145 0.41504,1.54785 0.41992,0.56153 1.14746,0.56153 0.71778,0 1.1377,-0.56641 0.41992,-0.56641 0.41992,-1.54297 0,-0.97168 -0.41992,-1.53808 -0.41992,-0.57129 -1.1377,-0.57129 z m 0,-0.76172 q 1.17188,0 1.84082,0.76172 0.66895,0.76171 0.66895,2.10937 0,1.34277 -0.66895,2.10938 -0.66894,0.76171 -1.84082,0.76171 -1.17675,0 -1.8457,-0.76171 -0.66406,-0.76661 -0.66406,-2.10938 0,-1.34766 0.66406,-2.10937 0.66895,-0.76172 1.8457,-0.76172 z"
style="font-size:10px"
id="path4113" />
<path
d="m 244.49614,458.19086 q -0.15137,-0.0879 -0.33203,-0.12696 -0.17578,-0.0439 -0.39063,-0.0439 -0.76172,0 -1.17187,0.49805 -0.40528,0.49316 -0.40528,1.42089 v 2.88086 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.28321,-0.49804 0.73731,-0.7373 0.4541,-0.24414 1.10352,-0.24414 0.0928,0 0.20507,0.0147 0.11231,0.01 0.24903,0.0342 z"
style="font-size:10px"
id="path4115" />
<path
d="m 245.44829,457.35101 h 0.89844 v 5.46875 h -0.89844 z m 0,-2.1289 h 0.89844 v 1.13769 h -0.89844 z"
style="font-size:10px"
id="path4117" />
<path
d="m 251.82036,460.02191 q 0,-0.97656 -0.40528,-1.51367 -0.40039,-0.53711 -1.12792,-0.53711 -0.72266,0 -1.12793,0.53711 -0.4004,0.53711 -0.4004,1.51367 0,0.97168 0.4004,1.50879 0.40527,0.53711 1.12793,0.53711 0.72753,0 1.12792,-0.53711 0.40528,-0.53711 0.40528,-1.50879 z m 0.89844,2.11914 q 0,1.39649 -0.62012,2.0752 -0.62012,0.68359 -1.89942,0.68359 -0.47363,0 -0.89355,-0.0732 -0.41992,-0.0684 -0.81543,-0.21484 v -0.87403 q 0.39551,0.21485 0.78125,0.31738 0.38574,0.10254 0.78613,0.10254 0.88379,0 1.32325,-0.46386 0.43945,-0.45899 0.43945,-1.3916 v -0.44434 q -0.27832,0.4834 -0.71289,0.72266 -0.43457,0.23925 -1.04004,0.23925 -1.00586,0 -1.6211,-0.7666 -0.61523,-0.7666 -0.61523,-2.03125 0,-1.26953 0.61523,-2.03613 0.61524,-0.7666 1.6211,-0.7666 0.60547,0 1.04004,0.23926 0.43457,0.23925 0.71289,0.72265 v -0.83008 h 0.89844 z"
style="font-size:10px"
id="path4119" />
<path
d="m 254.56938,457.35101 h 0.89844 v 5.46875 h -0.89844 z m 0,-2.1289 h 0.89844 v 1.13769 h -0.89844 z"
style="font-size:10px"
id="path4121" />
<path
d="m 261.88872,459.51898 v 3.30078 h -0.89844 v -3.27148 q 0,-0.77637 -0.30273,-1.16211 -0.30274,-0.38574 -0.90821,-0.38574 -0.72754,0 -1.14746,0.46386 -0.41992,0.46387 -0.41992,1.26465 v 3.09082 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.32227,-0.49316 0.75684,-0.7373 0.43945,-0.24414 1.01074,-0.24414 0.94238,0 1.42578,0.58593 0.4834,0.58106 0.4834,1.71387 z"
style="font-size:10px"
id="path4123" />
</g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -599,7 +599,7 @@ void window_close_callback(GLFWwindow* window)
The size of a window can be changed with @ref glfwSetWindowSize. For windowed The size of a window can be changed with @ref glfwSetWindowSize. For windowed
mode windows, this sets the size, in mode windows, this sets the size, in
[screen coordinates](@ref coordinate_systems) of the _client area_ or _content [screen coordinates](@ref coordinate_systems) of the _content area_ or _content
area_ of the window. The window system may impose limits on window size. area_ of the window. The window system may impose limits on window size.
@code @code
@ -619,7 +619,7 @@ glfwSetWindowSizeCallback(window, window_size_callback);
@endcode @endcode
The callback function receives the new size, in screen coordinates, of the The callback function receives the new size, in screen coordinates, of the
client area of the window when the window is resized. content area of the window when the window is resized.
@code @code
void window_size_callback(GLFWwindow* window, int width, int height) void window_size_callback(GLFWwindow* window, int width, int height)
@ -640,9 +640,9 @@ calls. The window size is in screen coordinates, not pixels. Use the
[framebuffer size](@ref window_fbsize), which is in pixels, for pixel-based [framebuffer size](@ref window_fbsize), which is in pixels, for pixel-based
calls. calls.
The above functions work with the size of the client area, but decorated windows The above functions work with the size of the content area, but decorated
typically have title bars and window frames around this rectangle. You can windows typically have title bars and window frames around this rectangle. You
retrieve the extents of these with @ref glfwGetWindowFrameSize. can retrieve the extents of these with @ref glfwGetWindowFrameSize.
@code @code
int left, top, right, bottom; int left, top, right, bottom;
@ -650,7 +650,7 @@ glfwGetWindowFrameSize(window, &left, &top, &right, &bottom);
@endcode @endcode
The returned values are the distances, in screen coordinates, from the edges of The returned values are the distances, in screen coordinates, from the edges of
the client area to the corresponding edges of the full window. As they are the content area to the corresponding edges of the full window. As they are
distances and not coordinates, they are always zero or positive. distances and not coordinates, they are always zero or positive.
@ -737,10 +737,10 @@ GLFW_SCALE_TO_MONITOR window hint.
@subsection window_sizelimits Window size limits @subsection window_sizelimits Window size limits
The minimum and maximum size of the client area of a windowed mode window can be The minimum and maximum size of the content area of a windowed mode window can
enforced with @ref glfwSetWindowSizeLimits. The user may resize the window to be enforced with @ref glfwSetWindowSizeLimits. The user may resize the window
any size and aspect ratio within the specified limits, unless the aspect ratio to any size and aspect ratio within the specified limits, unless the aspect
is also set. ratio is also set.
@code @code
glfwSetWindowSizeLimits(window, 200, 200, 400, 400); glfwSetWindowSizeLimits(window, 200, 200, 400, 400);
@ -755,7 +755,7 @@ glfwSetWindowSizeLimits(window, 640, 480, GLFW_DONT_CARE, GLFW_DONT_CARE);
To disable size limits for a window, set them all to `GLFW_DONT_CARE`. To disable size limits for a window, set them all to `GLFW_DONT_CARE`.
The aspect ratio of the client area of a windowed mode window can be enforced The aspect ratio of the content area of a windowed mode window can be enforced
with @ref glfwSetWindowAspectRatio. The user may resize the window freely with @ref glfwSetWindowAspectRatio. The user may resize the window freely
unless size limits are also set, but the size will be constrained to maintain unless size limits are also set, but the size will be constrained to maintain
the aspect ratio. the aspect ratio.
@ -785,7 +785,7 @@ are undefined if they conflict.
The position of a windowed-mode window can be changed with @ref The position of a windowed-mode window can be changed with @ref
glfwSetWindowPos. This moves the window so that the upper-left corner of its glfwSetWindowPos. This moves the window so that the upper-left corner of its
client area has the specified [screen coordinates](@ref coordinate_systems). content area has the specified [screen coordinates](@ref coordinate_systems).
The window system may put limitations on window placement. The window system may put limitations on window placement.
@code @code
@ -800,7 +800,7 @@ glfwSetWindowPosCallback(window, window_pos_callback);
@endcode @endcode
The callback function receives the new position, in screen coordinates, of the The callback function receives the new position, in screen coordinates, of the
upper-left corner of the client area when the window is moved. upper-left corner of the content area when the window is moved.
@code @code
void window_pos_callback(GLFWwindow* window, int xpos, int ypos) void window_pos_callback(GLFWwindow* window, int xpos, int ypos)
@ -809,7 +809,7 @@ void window_pos_callback(GLFWwindow* window, int xpos, int ypos)
@endcode @endcode
There is also @ref glfwGetWindowPos for directly retrieving the current position There is also @ref glfwGetWindowPos for directly retrieving the current position
of the client area of the window. of the content area of the window.
@code @code
int xpos, ypos; int xpos, ypos;
@ -1249,8 +1249,8 @@ __GLFW_MAXIMIZED__ indicates whether the specified window is maximized. See
@anchor GLFW_HOVERED_attrib @anchor GLFW_HOVERED_attrib
__GLFW_HOVERED__ indicates whether the cursor is currently directly over the __GLFW_HOVERED__ indicates whether the cursor is currently directly over the
client area of the window, with no other windows between. See @ref cursor_enter content area of the window, with no other windows between. See @ref
for details. cursor_enter for details.
@anchor GLFW_VISIBLE_attrib @anchor GLFW_VISIBLE_attrib
__GLFW_VISIBLE__ indicates whether the specified window is visible. See @ref __GLFW_VISIBLE__ indicates whether the specified window is visible. See @ref

View File

@ -1170,9 +1170,9 @@ typedef void (* GLFWerrorfun)(int,const char*);
* *
* @param[in] window The window that was moved. * @param[in] window The window that was moved.
* @param[in] xpos The new x-coordinate, in screen coordinates, of the * @param[in] xpos The new x-coordinate, in screen coordinates, of the
* upper-left corner of the client area of the window. * upper-left corner of the content area of the window.
* @param[in] ypos The new y-coordinate, in screen coordinates, of the * @param[in] ypos The new y-coordinate, in screen coordinates, of the
* upper-left corner of the client area of the window. * upper-left corner of the content area of the window.
* *
* @sa @ref window_pos * @sa @ref window_pos
* @sa @ref glfwSetWindowPosCallback * @sa @ref glfwSetWindowPosCallback
@ -1349,9 +1349,9 @@ typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int);
* *
* @param[in] window The window that received the event. * @param[in] window The window that received the event.
* @param[in] xpos The new cursor x-coordinate, relative to the left edge of * @param[in] xpos The new cursor x-coordinate, relative to the left edge of
* the client area. * the content area.
* @param[in] ypos The new cursor y-coordinate, relative to the top edge of the * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the
* client area. * content area.
* *
* @sa @ref cursor_pos * @sa @ref cursor_pos
* @sa @ref glfwSetCursorPosCallback * @sa @ref glfwSetCursorPosCallback
@ -1367,7 +1367,7 @@ typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double);
* This is the function signature for cursor enter/leave callback functions. * This is the function signature for cursor enter/leave callback functions.
* *
* @param[in] window The window that received the event. * @param[in] window The window that received the event.
* @param[in] entered `GLFW_TRUE` if the cursor entered the window's client * @param[in] entered `GLFW_TRUE` if the cursor entered the window's content
* area, or `GLFW_FALSE` if it left it. * area, or `GLFW_FALSE` if it left it.
* *
* @sa @ref cursor_enter * @sa @ref cursor_enter
@ -2644,19 +2644,19 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
*/ */
GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images); GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images);
/*! @brief Retrieves the position of the client area of the specified window. /*! @brief Retrieves the position of the content area of the specified window.
* *
* This function retrieves the position, in screen coordinates, of the * This function retrieves the position, in screen coordinates, of the
* upper-left corner of the client area of the specified window. * upper-left corner of the content area of the specified window.
* *
* Any or all of the position arguments may be `NULL`. If an error occurs, all * Any or all of the position arguments may be `NULL`. If an error occurs, all
* non-`NULL` position arguments will be set to zero. * non-`NULL` position arguments will be set to zero.
* *
* @param[in] window The window to query. * @param[in] window The window to query.
* @param[out] xpos Where to store the x-coordinate of the upper-left corner of * @param[out] xpos Where to store the x-coordinate of the upper-left corner of
* the client area, or `NULL`. * the content area, or `NULL`.
* @param[out] ypos Where to store the y-coordinate of the upper-left corner of * @param[out] ypos Where to store the y-coordinate of the upper-left corner of
* the client area, or `NULL`. * the content area, or `NULL`.
* *
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR. * GLFW_PLATFORM_ERROR.
@ -2676,10 +2676,10 @@ GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* i
*/ */
GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos); GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
/*! @brief Sets the position of the client area of the specified window. /*! @brief Sets the position of the content area of the specified window.
* *
* This function sets the position, in screen coordinates, of the upper-left * This function sets the position, in screen coordinates, of the upper-left
* corner of the client area of the specified windowed mode window. If the * corner of the content area of the specified windowed mode window. If the
* window is a full screen window, this function does nothing. * window is a full screen window, this function does nothing.
* *
* __Do not use this function__ to move an already visible window unless you * __Do not use this function__ to move an already visible window unless you
@ -2689,8 +2689,8 @@ GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
* cannot and should not override these limits. * cannot and should not override these limits.
* *
* @param[in] window The window to query. * @param[in] window The window to query.
* @param[in] xpos The x-coordinate of the upper-left corner of the client area. * @param[in] xpos The x-coordinate of the upper-left corner of the content area.
* @param[in] ypos The y-coordinate of the upper-left corner of the client area. * @param[in] ypos The y-coordinate of the upper-left corner of the content area.
* *
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR. * GLFW_PLATFORM_ERROR.
@ -2711,9 +2711,9 @@ GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
*/ */
GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos); GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
/*! @brief Retrieves the size of the client area of the specified window. /*! @brief Retrieves the size of the content area of the specified window.
* *
* This function retrieves the size, in screen coordinates, of the client area * This function retrieves the size, in screen coordinates, of the content area
* of the specified window. If you wish to retrieve the size of the * of the specified window. If you wish to retrieve the size of the
* framebuffer of the window in pixels, see @ref glfwGetFramebufferSize. * framebuffer of the window in pixels, see @ref glfwGetFramebufferSize.
* *
@ -2722,9 +2722,9 @@ GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
* *
* @param[in] window The window whose size to retrieve. * @param[in] window The window whose size to retrieve.
* @param[out] width Where to store the width, in screen coordinates, of the * @param[out] width Where to store the width, in screen coordinates, of the
* client area, or `NULL`. * content area, or `NULL`.
* @param[out] height Where to store the height, in screen coordinates, of the * @param[out] height Where to store the height, in screen coordinates, of the
* client area, or `NULL`. * content area, or `NULL`.
* *
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR. * GLFW_PLATFORM_ERROR.
@ -2743,7 +2743,7 @@ GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
/*! @brief Sets the size limits of the specified window. /*! @brief Sets the size limits of the specified window.
* *
* This function sets the size limits of the client area of the specified * This function sets the size limits of the content area of the specified
* window. If the window is full screen, the size limits only take effect * window. If the window is full screen, the size limits only take effect
* once it is made windowed. If the window is not resizable, this function * once it is made windowed. If the window is not resizable, this function
* does nothing. * does nothing.
@ -2755,14 +2755,14 @@ GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
* dimensions and all must be greater than or equal to zero. * dimensions and all must be greater than or equal to zero.
* *
* @param[in] window The window to set limits for. * @param[in] window The window to set limits for.
* @param[in] minwidth The minimum width, in screen coordinates, of the client * @param[in] minwidth The minimum width, in screen coordinates, of the content
* area, or `GLFW_DONT_CARE`. * area, or `GLFW_DONT_CARE`.
* @param[in] minheight The minimum height, in screen coordinates, of the * @param[in] minheight The minimum height, in screen coordinates, of the
* client area, or `GLFW_DONT_CARE`. * content area, or `GLFW_DONT_CARE`.
* @param[in] maxwidth The maximum width, in screen coordinates, of the client * @param[in] maxwidth The maximum width, in screen coordinates, of the content
* area, or `GLFW_DONT_CARE`. * area, or `GLFW_DONT_CARE`.
* @param[in] maxheight The maximum height, in screen coordinates, of the * @param[in] maxheight The maximum height, in screen coordinates, of the
* client area, or `GLFW_DONT_CARE`. * content area, or `GLFW_DONT_CARE`.
* *
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
* GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
@ -2786,7 +2786,7 @@ GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minhe
/*! @brief Sets the aspect ratio of the specified window. /*! @brief Sets the aspect ratio of the specified window.
* *
* This function sets the required aspect ratio of the client area of the * This function sets the required aspect ratio of the content area of the
* specified window. If the window is full screen, the aspect ratio only takes * specified window. If the window is full screen, the aspect ratio only takes
* effect once it is made windowed. If the window is not resizable, this * effect once it is made windowed. If the window is not resizable, this
* function does nothing. * function does nothing.
@ -2827,9 +2827,9 @@ GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minhe
*/ */
GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom); GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom);
/*! @brief Sets the size of the client area of the specified window. /*! @brief Sets the size of the content area of the specified window.
* *
* This function sets the size, in screen coordinates, of the client area of * This function sets the size, in screen coordinates, of the content area of
* the specified window. * the specified window.
* *
* For full screen windows, this function updates the resolution of its desired * For full screen windows, this function updates the resolution of its desired
@ -2845,9 +2845,9 @@ GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom);
* *
* @param[in] window The window to resize. * @param[in] window The window to resize.
* @param[in] width The desired width, in screen coordinates, of the window * @param[in] width The desired width, in screen coordinates, of the window
* client area. * content area.
* @param[in] height The desired height, in screen coordinates, of the window * @param[in] height The desired height, in screen coordinates, of the window
* client area. * content area.
* *
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR. * GLFW_PLATFORM_ERROR.
@ -3251,7 +3251,7 @@ GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
* The window position is ignored when setting a monitor. * The window position is ignored when setting a monitor.
* *
* When the monitor is `NULL`, the position, width and height are used to * When the monitor is `NULL`, the position, width and height are used to
* place the window client area. The refresh rate is ignored when no monitor * place the window content area. The refresh rate is ignored when no monitor
* is specified. * is specified.
* *
* If you only wish to update the resolution of a full screen window or the * If you only wish to update the resolution of a full screen window or the
@ -3264,12 +3264,12 @@ GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
* @param[in] window The window whose monitor, size or video mode to set. * @param[in] window The window whose monitor, size or video mode to set.
* @param[in] monitor The desired monitor, or `NULL` to set windowed mode. * @param[in] monitor The desired monitor, or `NULL` to set windowed mode.
* @param[in] xpos The desired x-coordinate of the upper-left corner of the * @param[in] xpos The desired x-coordinate of the upper-left corner of the
* client area. * content area.
* @param[in] ypos The desired y-coordinate of the upper-left corner of the * @param[in] ypos The desired y-coordinate of the upper-left corner of the
* client area. * content area.
* @param[in] width The desired with, in screen coordinates, of the client area * @param[in] width The desired with, in screen coordinates, of the content
* or video mode. * area or video mode.
* @param[in] height The desired height, in screen coordinates, of the client * @param[in] height The desired height, in screen coordinates, of the content
* area or video mode. * area or video mode.
* @param[in] refreshRate The desired refresh rate, in Hz, of the video mode, * @param[in] refreshRate The desired refresh rate, in Hz, of the video mode,
* or `GLFW_DONT_CARE`. * or `GLFW_DONT_CARE`.
@ -3419,8 +3419,8 @@ GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
* *
* This function sets the position callback of the specified window, which is * This function sets the position callback of the specified window, which is
* called when the window is moved. The callback is provided with the * called when the window is moved. The callback is provided with the
* position, in screen coordinates, of the upper-left corner of the client area * position, in screen coordinates, of the upper-left corner of the content
* of the window. * area of the window.
* *
* @param[in] window The window whose callback to set. * @param[in] window The window whose callback to set.
* @param[in] cbfun The new callback, or `NULL` to remove the currently set * @param[in] cbfun The new callback, or `NULL` to remove the currently set
@ -3447,7 +3447,7 @@ GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindow
* *
* This function sets the size callback of the specified window, which is * This function sets the size callback of the specified window, which is
* called when the window is resized. The callback is provided with the size, * called when the window is resized. The callback is provided with the size,
* in screen coordinates, of the client area of the window. * in screen coordinates, of the content area of the window.
* *
* @param[in] window The window whose callback to set. * @param[in] window The window whose callback to set.
* @param[in] cbfun The new callback, or `NULL` to remove the currently set * @param[in] cbfun The new callback, or `NULL` to remove the currently set
@ -3504,7 +3504,7 @@ GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwi
/*! @brief Sets the refresh callback for the specified window. /*! @brief Sets the refresh callback for the specified window.
* *
* This function sets the refresh callback of the specified window, which is * This function sets the refresh callback of the specified window, which is
* called when the client area of the window needs to be redrawn, for example * called when the content area of the window needs to be redrawn, for example
* if the window has been exposed after having been covered by another window. * if the window has been exposed after having been covered by another window.
* *
* On compositing window systems such as Aero, Compiz, Aqua or Wayland, where * On compositing window systems such as Aero, Compiz, Aqua or Wayland, where
@ -3838,8 +3838,8 @@ GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
* If the mode is `GLFW_CURSOR`, the value must be one of the following cursor * If the mode is `GLFW_CURSOR`, the value must be one of the following cursor
* modes: * modes:
* - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally. * - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally.
* - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the client * - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the
* area of the window but does not restrict the cursor from leaving. * content area of the window but does not restrict the cursor from leaving.
* - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual * - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual
* and unlimited cursor movement. This is useful for implementing for * and unlimited cursor movement. This is useful for implementing for
* example 3D camera controls. * example 3D camera controls.
@ -4042,11 +4042,11 @@ GLFWAPI int glfwGetKey(GLFWwindow* window, int key);
*/ */
GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button); GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
/*! @brief Retrieves the position of the cursor relative to the client area of /*! @brief Retrieves the position of the cursor relative to the content area of
* the window. * the window.
* *
* This function returns the position of the cursor, in screen coordinates, * This function returns the position of the cursor, in screen coordinates,
* relative to the upper-left corner of the client area of the specified * relative to the upper-left corner of the content area of the specified
* window. * window.
* *
* If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor * If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor
@ -4062,9 +4062,9 @@ GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
* *
* @param[in] window The desired window. * @param[in] window The desired window.
* @param[out] xpos Where to store the cursor x-coordinate, relative to the * @param[out] xpos Where to store the cursor x-coordinate, relative to the
* left edge of the client area, or `NULL`. * left edge of the content area, or `NULL`.
* @param[out] ypos Where to store the cursor y-coordinate, relative to the to * @param[out] ypos Where to store the cursor y-coordinate, relative to the to
* top edge of the client area, or `NULL`. * top edge of the content area, or `NULL`.
* *
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR. * GLFW_PLATFORM_ERROR.
@ -4080,11 +4080,11 @@ GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
*/ */
GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos); GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
/*! @brief Sets the position of the cursor, relative to the client area of the /*! @brief Sets the position of the cursor, relative to the content area of the
* window. * window.
* *
* This function sets the position, in screen coordinates, of the cursor * This function sets the position, in screen coordinates, of the cursor
* relative to the upper-left corner of the client area of the specified * relative to the upper-left corner of the content area of the specified
* window. The window must have input focus. If the window does not have * window. The window must have input focus. If the window does not have
* input focus when this function is called, it fails silently. * input focus when this function is called, it fails silently.
* *
@ -4099,9 +4099,9 @@ GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
* *
* @param[in] window The desired window. * @param[in] window The desired window.
* @param[in] xpos The desired x-coordinate, relative to the left edge of the * @param[in] xpos The desired x-coordinate, relative to the left edge of the
* client area. * content area.
* @param[in] ypos The desired y-coordinate, relative to the top edge of the * @param[in] ypos The desired y-coordinate, relative to the top edge of the
* client area. * content area.
* *
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR. * GLFW_PLATFORM_ERROR.
@ -4211,7 +4211,7 @@ GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor);
/*! @brief Sets the cursor for the window. /*! @brief Sets the cursor for the window.
* *
* This function sets the cursor image to be used when the cursor is over the * This function sets the cursor image to be used when the cursor is over the
* client area of the specified window. The set cursor will only be visible * content area of the specified window. The set cursor will only be visible
* when the [cursor mode](@ref cursor_mode) of the window is * when the [cursor mode](@ref cursor_mode) of the window is
* `GLFW_CURSOR_NORMAL`. * `GLFW_CURSOR_NORMAL`.
* *
@ -4384,7 +4384,7 @@ GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmo
* This function sets the cursor position callback of the specified window, * This function sets the cursor position callback of the specified window,
* which is called when the cursor is moved. The callback is provided with the * which is called when the cursor is moved. The callback is provided with the
* position, in screen coordinates, relative to the upper-left corner of the * position, in screen coordinates, relative to the upper-left corner of the
* client area of the window. * content area of the window.
* *
* @param[in] window The window whose callback to set. * @param[in] window The window whose callback to set.
* @param[in] cbfun The new callback, or `NULL` to remove the currently set * @param[in] cbfun The new callback, or `NULL` to remove the currently set
@ -4407,7 +4407,7 @@ GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursor
/*! @brief Sets the cursor enter/exit callback. /*! @brief Sets the cursor enter/exit callback.
* *
* This function sets the cursor boundary crossing callback of the specified * This function sets the cursor boundary crossing callback of the specified
* window, which is called when the cursor enters or leaves the client area of * window, which is called when the cursor enters or leaves the content area of
* the window. * the window.
* *
* @param[in] window The window whose callback to set. * @param[in] window The window whose callback to set.

View File

@ -67,9 +67,9 @@ static NSUInteger getStyleMask(_GLFWwindow* window)
return styleMask; return styleMask;
} }
// Returns whether the cursor is in the client area of the specified window // Returns whether the cursor is in the content area of the specified window
// //
static GLFWbool cursorInClientArea(_GLFWwindow* window) static GLFWbool cursorInContentArea(_GLFWwindow* window)
{ {
const NSPoint pos = [window->ns.object mouseLocationOutsideOfEventStream]; const NSPoint pos = [window->ns.object mouseLocationOutsideOfEventStream];
return [window->ns.view mouse:pos inRect:[window->ns.view frame]]; return [window->ns.view mouse:pos inRect:[window->ns.view frame]];
@ -124,7 +124,7 @@ static void updateCursorMode(_GLFWwindow* window)
_glfwPlatformGetCursorPos(window, _glfwPlatformGetCursorPos(window,
&_glfw.ns.restoreCursorPosX, &_glfw.ns.restoreCursorPosX,
&_glfw.ns.restoreCursorPosY); &_glfw.ns.restoreCursorPosY);
_glfwCenterCursor(window); _glfwCenterCursorInContentArea(window);
CGAssociateMouseAndMouseCursorPosition(false); CGAssociateMouseAndMouseCursorPosition(false);
} }
else if (_glfw.ns.disabledCursorWindow == window) else if (_glfw.ns.disabledCursorWindow == window)
@ -136,7 +136,7 @@ static void updateCursorMode(_GLFWwindow* window)
_glfw.ns.restoreCursorPosY); _glfw.ns.restoreCursorPosY);
} }
if (cursorInClientArea(window)) if (cursorInContentArea(window))
updateCursorImage(window); updateCursorImage(window);
} }
@ -271,7 +271,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
[window->context.nsgl.object update]; [window->context.nsgl.object update];
if (_glfw.ns.disabledCursorWindow == window) if (_glfw.ns.disabledCursorWindow == window)
_glfwCenterCursor(window); _glfwCenterCursorInContentArea(window);
const int maximized = [window->ns.object isZoomed]; const int maximized = [window->ns.object isZoomed];
if (window->ns.maximized != maximized) if (window->ns.maximized != maximized)
@ -306,7 +306,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
[window->context.nsgl.object update]; [window->context.nsgl.object update];
if (_glfw.ns.disabledCursorWindow == window) if (_glfw.ns.disabledCursorWindow == window)
_glfwCenterCursor(window); _glfwCenterCursorInContentArea(window);
int x, y; int x, y;
_glfwPlatformGetWindowPos(window, &x, &y); _glfwPlatformGetWindowPos(window, &x, &y);
@ -332,7 +332,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
- (void)windowDidBecomeKey:(NSNotification *)notification - (void)windowDidBecomeKey:(NSNotification *)notification
{ {
if (_glfw.ns.disabledCursorWindow == window) if (_glfw.ns.disabledCursorWindow == window)
_glfwCenterCursor(window); _glfwCenterCursorInContentArea(window);
_glfwInputWindowFocus(window, GLFW_TRUE); _glfwInputWindowFocus(window, GLFW_TRUE);
updateCursorMode(window); updateCursorMode(window);
@ -1513,7 +1513,7 @@ void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
{ {
if (cursorInClientArea(window)) if (cursorInContentArea(window))
updateCursorImage(window); updateCursorImage(window);
} }

View File

@ -333,7 +333,7 @@ void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods)
} }
// Notifies shared code of a cursor motion event // Notifies shared code of a cursor motion event
// The position is specified in client-area relative screen coordinates // The position is specified in content area relative screen coordinates
// //
void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos) void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos)
{ {
@ -453,9 +453,9 @@ void _glfwFreeJoystick(_GLFWjoystick* js)
memset(js, 0, sizeof(_GLFWjoystick)); memset(js, 0, sizeof(_GLFWjoystick));
} }
// Center the cursor in the middle of the window // Center the cursor in the content area of the specified window
// //
void _glfwCenterCursor(_GLFWwindow* window) void _glfwCenterCursorInContentArea(_GLFWwindow* window)
{ {
int width, height; int width, height;

View File

@ -760,7 +760,7 @@ _GLFWjoystick* _glfwAllocJoystick(const char* name,
int buttonCount, int buttonCount,
int hatCount); int hatCount);
void _glfwFreeJoystick(_GLFWjoystick* js); void _glfwFreeJoystick(_GLFWjoystick* js);
void _glfwCenterCursor(_GLFWwindow* window); void _glfwCenterCursorInContentArea(_GLFWwindow* window);
GLFWbool _glfwInitVulkan(int mode); GLFWbool _glfwInitVulkan(int mode);
void _glfwTerminateVulkan(void); void _glfwTerminateVulkan(void);

View File

@ -186,14 +186,14 @@ static HICON createIcon(const GLFWimage* image,
return handle; return handle;
} }
// Translate client window size to full window size according to styles and DPI // Translate content area size to full window size according to styles and DPI
// //
static void getFullWindowSize(DWORD style, DWORD exStyle, static void getFullWindowSize(DWORD style, DWORD exStyle,
int clientWidth, int clientHeight, int contentWidth, int contentHeight,
int* fullWidth, int* fullHeight, int* fullWidth, int* fullHeight,
UINT dpi) UINT dpi)
{ {
RECT rect = { 0, 0, clientWidth, clientHeight }; RECT rect = { 0, 0, contentWidth, contentHeight };
if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32()) if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
AdjustWindowRectExForDpi(&rect, style, FALSE, exStyle, dpi); AdjustWindowRectExForDpi(&rect, style, FALSE, exStyle, dpi);
@ -204,7 +204,7 @@ static void getFullWindowSize(DWORD style, DWORD exStyle,
*fullHeight = rect.bottom - rect.top; *fullHeight = rect.bottom - rect.top;
} }
// Enforce the client rect aspect ratio based on which edge is being dragged // Enforce the content area aspect ratio based on which edge is being dragged
// //
static void applyAspectRatio(_GLFWwindow* window, int edge, RECT* area) static void applyAspectRatio(_GLFWwindow* window, int edge, RECT* area)
{ {
@ -278,7 +278,7 @@ static void disableCursor(_GLFWwindow* window)
&_glfw.win32.restoreCursorPosX, &_glfw.win32.restoreCursorPosX,
&_glfw.win32.restoreCursorPosY); &_glfw.win32.restoreCursorPosY);
updateCursorImage(window); updateCursorImage(window);
_glfwCenterCursor(window); _glfwCenterCursorInContentArea(window);
updateClipRect(window); updateClipRect(window);
if (!RegisterRawInputDevices(&rid, 1, sizeof(rid))) if (!RegisterRawInputDevices(&rid, 1, sizeof(rid)))
@ -308,9 +308,9 @@ static void enableCursor(_GLFWwindow* window)
} }
} }
// Returns whether the cursor is in the client area of the specified window // Returns whether the cursor is in the content area of the specified window
// //
static GLFWbool cursorInClientArea(_GLFWwindow* window) static GLFWbool cursorInContentArea(_GLFWwindow* window)
{ {
RECT area; RECT area;
POINT pos; POINT pos;
@ -1074,7 +1074,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
if (window->win32.scaleToMonitor) if (window->win32.scaleToMonitor)
break; break;
// Adjust the window size to keep the client area size constant // Adjust the window size to keep the content area size constant
if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32()) if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32())
{ {
RECT source = {0}, target = {0}; RECT source = {0}, target = {0};
@ -1244,7 +1244,7 @@ static int createNativeWindow(_GLFWwindow* window,
window->win32.scaleToMonitor = wndconfig->scaleToMonitor; window->win32.scaleToMonitor = wndconfig->scaleToMonitor;
// Adjust window size to account for DPI scaling of the window frame and // Adjust window size to account for DPI scaling of the window frame and
// optionally DPI scaling of the client area // optionally DPI scaling of the content area
// This cannot be done until we know what monitor it was placed on // This cannot be done until we know what monitor it was placed on
if (!window->monitor) if (!window->monitor)
{ {
@ -1779,7 +1779,7 @@ int _glfwPlatformWindowMaximized(_GLFWwindow* window)
int _glfwPlatformWindowHovered(_GLFWwindow* window) int _glfwPlatformWindowHovered(_GLFWwindow* window)
{ {
return cursorInClientArea(window); return cursorInContentArea(window);
} }
int _glfwPlatformFramebufferTransparent(_GLFWwindow* window) int _glfwPlatformFramebufferTransparent(_GLFWwindow* window)
@ -1972,7 +1972,7 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
} }
else if (_glfw.win32.disabledCursorWindow == window) else if (_glfw.win32.disabledCursorWindow == window)
enableCursor(window); enableCursor(window);
else if (cursorInClientArea(window)) else if (cursorInContentArea(window))
updateCursorImage(window); updateCursorImage(window);
} }
@ -2035,7 +2035,7 @@ void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
{ {
if (cursorInClientArea(window)) if (cursorInContentArea(window))
updateCursorImage(window); updateCursorImage(window);
} }

View File

@ -67,7 +67,7 @@ void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused)
} }
// Notifies shared code that a window has moved // Notifies shared code that a window has moved
// The position is specified in client-area relative screen coordinates // The position is specified in content area relative screen coordinates
// //
void _glfwInputWindowPos(_GLFWwindow* window, int x, int y) void _glfwInputWindowPos(_GLFWwindow* window, int x, int y)
{ {
@ -229,7 +229,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
if (window->monitor) if (window->monitor)
{ {
if (wndconfig.centerCursor) if (wndconfig.centerCursor)
_glfwCenterCursor(window); _glfwCenterCursorInContentArea(window);
} }
else else
{ {

View File

@ -544,7 +544,7 @@ static void disableCursor(_GLFWwindow* window)
&_glfw.x11.restoreCursorPosX, &_glfw.x11.restoreCursorPosX,
&_glfw.x11.restoreCursorPosY); &_glfw.x11.restoreCursorPosY);
updateCursorImage(window); updateCursorImage(window);
_glfwCenterCursor(window); _glfwCenterCursorInContentArea(window);
XGrabPointer(_glfw.x11.display, window->x11.handle, True, XGrabPointer(_glfw.x11.display, window->x11.handle, True,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask, ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
GrabModeAsync, GrabModeAsync, GrabModeAsync, GrabModeAsync,