1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00
Commit Graph

188 Commits

Author SHA1 Message Date
Camilla Löwy 8363179eee Win32: Disable fb transparency when it is broken
On Windows 7, when GLFW framebuffer transparency and the DWM are enabled
but DWM transparency is disabled (i.e. when the Transparency setting is
disabled under Personalization > Color), the contents of the framebuffer
is combined with the last frame using additive blending instead of
replacing the previous contents.

This commit limits GLFW framebuffer transparency on Windows 7 to when
DWM transparency is enabled, removing the previous workaround of setting
a layered window color key that led to rendering artifacts.

Fixes #1512.

(cherry picked from commit 05dd2fa298)
2020-09-02 22:27:45 +02:00
Camilla Löwy d858e48860 Win32: Fix non-BMP Unicode codepoint input
Supplementary Plane codepoints from WM_CHAR and WM_SYSCHAR messages were
reported as UTF-16 surrogate pairs.

Related to #1635.

(cherry picked from commit 6ce2070392)
2020-06-30 17:21:24 +02:00
Luflosi 71a4f2d8a2 Replace some tabs with spaces
I found some tabs where there should be spaces for consistency.
Closes #1496.

(cherry picked from commit 2db3b9688d)
2019-07-16 14:38:14 +02:00
Camilla Löwy ab118b2529 Fix copyright years (somewhat) 2019-04-15 20:50:00 +02:00
Camilla Löwy 93962ec168 Win32: Fix VS 2010 build error 2019-04-15 02:46:07 +02:00
Camilla Löwy 7c3aaf8065 Win32: Fix OCR_HAND macro missing on MinGW
Fixes #1438.
2019-02-24 04:18:11 +01:00
Camilla Löwy e2fa82ffbb Cleanup
Related to #1431.
2019-02-13 23:21:05 +01:00
Max Risuhin cf79f06257 Win32: Fix standard cursors not being DPI aware
Closes #1431.
2019-02-11 19:19:06 +01:00
Camilla Löwy 1725d1c4f5 Win32: Fix build on early Windows 10 SDKs
Related to #1320.
2018-10-22 00:51:08 +02:00
Camilla Löwy eeac43c3f7 Win32: Fix symbol definition detection
Related to #1320.
2018-09-05 22:45:06 +02:00
Camilla Löwy 089ea9af22 Add GLFW_SCALE_TO_MONITOR
This adds the GLFW_SCALE_TO_MONITOR window hint for automatically
resizing the content area of a window to the requested size times the
monitor content scale each time it is placed on a new monitor.  This
only applies to windowed mode windows and includes the initial placement
at window creation.

This hint only has an effect on platforms where screen coordinates and
pixels always map 1:1 such as Windows and X11.  Platforms like macOS
instead change the resolution of the framebuffer independently of the
window size.

Related to #676.
Related to #1115.
2018-09-03 23:12:39 +02:00
Camilla Löwy 5294439595 Win32: Add support for Per-Monitor V2 awareness
This adds basic support for the Per-Monitor V2 level of DPI awareness
in Windows 10, which allows for automatic DPI scaling of window
decorations.

This commit does not include resizing the window content area to match
the new window content scale.

Related to #1115.
Fixes #1294.
2018-09-03 23:12:39 +02:00
Camilla Löwy a67d8afbd4 Win32: Clean up DWM detection 2018-08-24 15:06:39 +02:00
Camilla Löwy f82a8f09eb Win32: Disable mouse trails for full screen
When mouse trails are enabled, the cursor becomes invisible when the
OpenGL ICD detects a full screen window and switches to page flipping.

Mouse trails are now disabled as long as any full screen windows are
visible.

Fixes #1263.
2018-08-02 00:01:26 +02:00
Camilla Löwy 15d89bdff6 Win32: Allow compile-time override of class name
To use, define _GLFW_WNDCLASSNAME to any sane wide string.

Fixes #1120.
2018-05-16 17:15:02 +02:00
Camilla Löwy c443b02472 Cleanup 2018-04-25 21:50:51 +02:00
Andreas Noever fcc244ea6d Win32: Fix windows build with WINVER >= Vista
In 32e78aeb2 the definition of DWM_BLURBEHIND in win32_platform.h was
moved behind a WINVER < 0x0600 preprocessor check (< Vista). This broke
the build for WINVER >= 0x0600 since DWM_BLURBEHIND is not defined.

Starting with Vista DWM_BLURBEHIND is available in Dwmapi.h.
So we can just include the header directly on Vista and above.

Closes #1253.
2018-04-25 21:50:51 +02:00
Camilla Löwy 1d75b205cb Cleanup
Allow window creation despite video mode setting failure.

Video mode setting failure is ignored the rest of the time and the
desired video mode has never been a hard constraint anyway.
2018-02-07 16:46:58 +01:00
Camilla Löwy 973bf29622 Remove use of non-standard function strdup
Related to #873.
2018-01-17 11:56:35 +01:00
przemekmirek 9f91bd6ea9 Win32: Fix HDEVNOTIFY handle leak
Closes #1170.
2018-01-05 08:12:51 +01:00
Camilla Löwy 638c4b604e Cleanup 2017-12-06 18:01:33 +01:00
Camilla Löwy 98990217bc Cleanup 2017-11-10 02:58:19 +01:00
Camilla Löwy 16bf872117 Add content scale queries
This adds glfwGetWindowContentScale and glfwGetMonitorContentScale for
querying the recommended drawing scale factor for DPI-aware rendering.

Parts of this patch are based on code by @ferreiradaselva.

Fixes #235.
Fixes #439.
Fixes #677.
Fixes #845.
Fixes #898.
2017-10-26 17:26:36 +02:00
Camilla Löwy 32e78aeb2e Add GLFW_TRANSPARENT attribute and documentation
This completes support for window framebuffer transparency on Windows,
macOS and X11.  Note that the hint/attribute may be renamed before
release to clarify its relationship to GLFW_OPACITY.

Fixes #197.
Closes #1079.
Related to #663.
Related to #715.
Related to #723.
Related to #1078.
2017-09-27 21:54:04 +02:00
Christopher Pelloux 51f0cd3b51 Win32: Implement GLFW_TRANSPARENT
This is a squashed extract of several commits, minimally edited to
ensure it compiles.

Related to #197.
Related to #723.
2017-09-27 21:33:03 +02:00
Camilla Löwy 25b7eba4a0 Win32: Clean up dynamic loading and version checks 2017-09-27 21:33:03 +02:00
Camilla Löwy 4637c31d82 Win32: Remove unused header 2017-09-13 23:19:29 +02:00
Camilla Löwy f8668c5a9f Win32: Fix key names not matching other platforms
This brings printable key names more in line with the results provided
on other platforms.

Fixes #943.
2017-09-13 17:55:51 +02:00
Camilla Löwy a368d89c94 Win32: Fix disabled cursor mode vs caption buttons
This postpones disabling the cursor until the user is done interacting
with a caption button.

Related to #650.
Fixes #1071.
2017-09-08 16:18:15 +02:00
Camilla Löwy 45ca8b8d19 Win32: Add HMONITOR to monitor data 2017-08-28 18:27:55 +02:00
Camilla Löwy 0d6937b33b Cleanup 2017-08-20 14:41:49 +02:00
Camilla Löwy 14a3fe0ac0 Make glfwGetError also provide description
Related to #970.
2017-06-08 16:08:36 +02:00
Camilla Löwy 372e908682 Remove internal header inclusion guards
Inclusion of internal headers is already both centralized and follows
strict rules.  Inclusion guards are both an unneccessary maintenance
burden and may hide inclusion order bugs.
2017-05-25 19:35:13 +02:00
Camilla Löwy 1982543cd2 Cleanup 2017-03-19 02:46:16 +01:00
Camilla Löwy aaf2800c9c Add internal TLS support
Related to #970.
2017-03-19 00:52:46 +01:00
Camilla Löwy e9560ef021 Add GLFW_OSMESA_CONTEXT_API
This allows the creation of OpenGL contexts via OSMesa on existing
platforms.  It does not add a compile- or link-time dependency on
OSMesa.

Fixes #281.
2017-02-28 20:38:10 +01:00
Camilla Löwy 918b4e81d2 Win32: Move to WM_INPUT for disabled cursor motion
Related to #125.
2017-02-26 18:48:03 +01:00
Camilla Löwy 355b46e6c5 Win32: Fix screensaver and blanking prevention
On Vista and later, Handling WM_SYSCOMMAND is not enough to prevent
password protected screensavers or monitor blanking.

Fixes #851.
2017-02-10 02:28:55 +01:00
Camilla Löwy 260dbf0a1d Win32: Cleanup 2017-01-29 19:50:35 +01:00
Camilla Löwy c28778e28c Win32: Improve platform error messages
Related to #733.
2017-01-20 01:35:24 +01:00
Camilla Löwy 04f559e28d Restructure monitor enumeration
This way is both kinder on event-based enumeration and less work to
unwind allocations for when properly implementing GLFW_OUT_OF_MEMORY.
2017-01-02 06:03:02 +01:00
Camilla Löwy 0e8ba24f32 Formatting 2016-12-08 16:56:05 +01:00
Camilla Löwy 32eb50b75e Move to Vulkan style function typedefs
PFN_FunctionName is more readable than SCREAMSOUP_T.

Context creation API function typedefs are kept as-is where the original
header provided them, for compatibility and familiarity reasons.
2016-12-08 16:56:05 +01:00
Camilla Löwy f4d0c83181 Paperwork done 2016-11-30 14:00:41 +01:00
Camilla Berglund c156b50e4c Add glfwSetWindowMaximizeCallback
Fixes #778.
2016-09-29 01:24:56 +02:00
Camilla Berglund e6a32db7b9 Cleanup 2016-09-07 16:49:29 +02:00
Camilla Berglund 53fafad915 Start 3.3 2016-08-18 23:55:49 +02:00
Camilla Berglund 9a781cef53 Formatting 2016-06-15 01:35:07 +02:00
Camilla Berglund 757eea2779 Update email address 2016-06-01 21:25:20 +02:00
Camilla Berglund 6a8e169001 Update copyright notice year 2016-06-01 21:25:19 +02:00