mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
Merge branch '3.3-stable' into new-cursors-on-3.3-stable
This commit is contained in:
commit
82b8651e00
@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
project(GLFW VERSION 3.3.3 LANGUAGES C)
|
project(GLFW VERSION 3.3.5 LANGUAGES C)
|
||||||
|
|
||||||
set(CMAKE_LEGACY_CYGWIN_WIN32 OFF)
|
set(CMAKE_LEGACY_CYGWIN_WIN32 OFF)
|
||||||
|
|
||||||
|
42
README.md
42
README.md
@ -118,47 +118,7 @@ information on what to include when reporting a bug.
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
- Added `GLFW_RESIZE_NWSE_CURSOR`, `GLFW_RESIZE_NESW_CURSOR`,
|
There is nothing here yet.
|
||||||
`GLFW_RESIZE_ALL_CURSOR` and `GLFW_NOT_ALLOWED_CURSOR` cursor shapes (#427)
|
|
||||||
- Added `GLFW_RESIZE_EW_CURSOR` alias for `GLFW_HRESIZE_CURSOR` (#427)
|
|
||||||
- Added `GLFW_RESIZE_NS_CURSOR` alias for `GLFW_VRESIZE_CURSOR` (#427)
|
|
||||||
- Added `GLFW_POINTING_HAND_CURSOR` alias for `GLFW_HAND_CURSOR` (#427)
|
|
||||||
- Bugfix: Some extension loader headers did not prevent default OpenGL header
|
|
||||||
inclusion (#1695)
|
|
||||||
- [Win32] Disabled framebuffer transparency on Windows 7 when DWM windows are
|
|
||||||
opaque (#1512)
|
|
||||||
- [Win32] Bugfix: Non-BMP Unicode codepoint input was reported as UTF-16
|
|
||||||
- [Win32] Bugfix: Monitor functions could return invalid values after
|
|
||||||
configuration change (#1761)
|
|
||||||
- [Win32] Bugfix: Initialization would segfault on Windows 8 (not 8.1) (#1775)
|
|
||||||
- [Win32] Bugfix: Duplicate size events were not filtered (#1610)
|
|
||||||
- [Cocoa] Changed `EGLNativeWindowType` from `NSView` to `CALayer` (#1169)
|
|
||||||
- [Cocoa] Bugfix: Non-BMP Unicode codepoint input was reported as UTF-16
|
|
||||||
(#1635)
|
|
||||||
- [Cocoa] Bugfix: Failing to retrieve the refresh rate of built-in displays
|
|
||||||
could leak memory
|
|
||||||
- [Cocoa] Bugfix: Objective-C files were compiled as C with CMake 3.19 (#1787)
|
|
||||||
- [Cocoa] Bugfix: Duplicate video modes were not filtered out (#1830)
|
|
||||||
- [Cocoa] Bugfix: Menubar was not clickable on macOS 10.15+ until it lost and
|
|
||||||
regained focus (#1648,#1802)
|
|
||||||
- [Cocoa] Bugfix: Monitor name query could segfault on macOS 11 (#1809,#1833)
|
|
||||||
- [Cocoa] Bugfix: The install name of the installed dylib was relative (#1504)
|
|
||||||
- [X11] Bugfix: IME input of CJK was broken for "C" locale (#1587,#1636)
|
|
||||||
- [X11] Bugfix: Xlib errors caused by other parts of the application could be
|
|
||||||
reported as GLFW errors
|
|
||||||
- [X11] Bugfix: A handle race condition could cause a `BadWindow` error (#1633)
|
|
||||||
- [X11] Bugfix: XKB path used keysyms instead of physical locations for
|
|
||||||
non-printable keys (#1598)
|
|
||||||
- [X11] Bugfix: Function keys were mapped to `GLFW_KEY_UNKNOWN` for some layout
|
|
||||||
combinaitons (#1598)
|
|
||||||
- [X11] Bugfix: Keys pressed simultaneously with others were not always
|
|
||||||
reported (#1112,#1415,#1472,#1616)
|
|
||||||
- [Wayland] Bugfix: Repeated keys could be reported with `NULL` window (#1704)
|
|
||||||
- [Wayland] Bugfix: Retrieving partial framebuffer size would segfault
|
|
||||||
- [Wayland] Bugfix: Scrolling offsets were inverted compared to other platforms
|
|
||||||
(#1463)
|
|
||||||
- [Wayland] Bugfix: Client-Side Decorations were destroyed in the wrong worder
|
|
||||||
(#1798)
|
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -295,7 +295,7 @@ extern "C" {
|
|||||||
* API changes.
|
* API changes.
|
||||||
* @ingroup init
|
* @ingroup init
|
||||||
*/
|
*/
|
||||||
#define GLFW_VERSION_REVISION 3
|
#define GLFW_VERSION_REVISION 5
|
||||||
/*! @} */
|
/*! @} */
|
||||||
|
|
||||||
/*! @brief One.
|
/*! @brief One.
|
||||||
|
@ -39,6 +39,10 @@ static const GUID _glfw_GUID_DEVINTERFACE_HID =
|
|||||||
|
|
||||||
#if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG)
|
#if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG)
|
||||||
|
|
||||||
|
#if defined(_GLFW_BUILD_DLL)
|
||||||
|
#warning "These symbols must be exported by the executable and have no effect in a DLL"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Executables (but not DLLs) exporting this symbol with this value will be
|
// Executables (but not DLLs) exporting this symbol with this value will be
|
||||||
// automatically directed to the high-performance GPU on Nvidia Optimus systems
|
// automatically directed to the high-performance GPU on Nvidia Optimus systems
|
||||||
// with up-to-date drivers
|
// with up-to-date drivers
|
||||||
|
@ -505,7 +505,17 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
case WM_NCCREATE:
|
case WM_NCCREATE:
|
||||||
{
|
{
|
||||||
if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
|
if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())
|
||||||
|
{
|
||||||
|
const CREATESTRUCTW* cs = (const CREATESTRUCTW*) lParam;
|
||||||
|
const _GLFWwndconfig* wndconfig = cs->lpCreateParams;
|
||||||
|
|
||||||
|
// On per-monitor DPI aware V1 systems, only enable
|
||||||
|
// non-client scaling for windows that scale the client area
|
||||||
|
// We need WM_GETDPISCALEDSIZE from V2 to keep the client
|
||||||
|
// area static when the non-client area is scaled
|
||||||
|
if (wndconfig && wndconfig->scaleToMonitor)
|
||||||
EnableNonClientDpiScaling(hWnd);
|
EnableNonClientDpiScaling(hWnd);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1131,9 +1141,11 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
const float xscale = HIWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;
|
const float xscale = HIWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;
|
||||||
const float yscale = LOWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;
|
const float yscale = LOWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;
|
||||||
|
|
||||||
// Only apply the suggested size if the OS is new enough to have
|
// Resize windowed mode windows that either permit rescaling or that
|
||||||
// sent a WM_GETDPISCALEDSIZE before this
|
// need it to compensate for non-client area scaling
|
||||||
if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32())
|
if (!window->monitor &&
|
||||||
|
(window->win32.scaleToMonitor ||
|
||||||
|
_glfwIsWindows10CreatorsUpdateOrGreaterWin32()))
|
||||||
{
|
{
|
||||||
RECT* suggested = (RECT*) lParam;
|
RECT* suggested = (RECT*) lParam;
|
||||||
SetWindowPos(window->win32.handle, HWND_TOP,
|
SetWindowPos(window->win32.handle, HWND_TOP,
|
||||||
@ -1248,7 +1260,7 @@ static int createNativeWindow(_GLFWwindow* window,
|
|||||||
NULL, // No parent window
|
NULL, // No parent window
|
||||||
NULL, // No window menu
|
NULL, // No window menu
|
||||||
GetModuleHandleW(NULL),
|
GetModuleHandleW(NULL),
|
||||||
NULL);
|
(LPVOID) wndconfig);
|
||||||
|
|
||||||
free(wideTitle);
|
free(wideTitle);
|
||||||
|
|
||||||
|
@ -88,6 +88,14 @@ static void outputHandleDone(void* data, struct wl_output* output)
|
|||||||
{
|
{
|
||||||
struct _GLFWmonitor *monitor = data;
|
struct _GLFWmonitor *monitor = data;
|
||||||
|
|
||||||
|
if (monitor->widthMM <= 0 || monitor->heightMM <= 0)
|
||||||
|
{
|
||||||
|
// If Wayland does not provide a physical size, assume the default 96 DPI
|
||||||
|
const GLFWvidmode* mode = &monitor->modes[monitor->wl.currentMode];
|
||||||
|
monitor->widthMM = (int) (mode->width * 25.4f / 96.f);
|
||||||
|
monitor->heightMM = (int) (mode->height * 25.4f / 96.f);
|
||||||
|
}
|
||||||
|
|
||||||
_glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);
|
_glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2500,7 +2500,11 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (window->monitor)
|
if (window->monitor)
|
||||||
|
{
|
||||||
|
_glfwPlatformSetWindowDecorated(window, window->decorated);
|
||||||
|
_glfwPlatformSetWindowFloating(window, window->floating);
|
||||||
releaseMonitor(window);
|
releaseMonitor(window);
|
||||||
|
}
|
||||||
|
|
||||||
_glfwInputWindowMonitor(window, monitor);
|
_glfwInputWindowMonitor(window, monitor);
|
||||||
updateNormalHints(window, width, height);
|
updateNormalHints(window, width, height);
|
||||||
|
Loading…
Reference in New Issue
Block a user