mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
Compare commits
14 Commits
b00e6a8a88
..
ci
| Author | SHA1 | Date | |
|---|---|---|---|
| 92dcf4ce74 | |||
| d9d6f0f1f9 | |||
| deeadd3c30 | |||
| 0984b4354a | |||
| b7ef2919b0 | |||
| 463cf73610 | |||
| ed6452b13c | |||
| e94108d9db | |||
| dc86d02ff1 | |||
| 06406a00a0 | |||
| de0c378aa2 | |||
| 567b1ec244 | |||
| 0136febb1e | |||
| 6c397996b8 |
@@ -3,3 +3,5 @@
|
||||
.gitattributes export-ignore
|
||||
.travis.yml export-ignore
|
||||
.appveyor.yml export-ignore
|
||||
.mailmap export-ignore
|
||||
.github export-ignore
|
||||
|
||||
@@ -74,8 +74,8 @@ jobs:
|
||||
- name: Build Cocoa shared library
|
||||
run: cmake --build build-cocoa-shared --parallel
|
||||
|
||||
build-windows-vs2022:
|
||||
name: Windows (VS2022)
|
||||
build-windows-msvc:
|
||||
name: Windows (MSVC)
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 4
|
||||
env:
|
||||
@@ -84,17 +84,17 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Configure Win32 shared x86 library
|
||||
run: cmake -B build-win32-shared-x86 -G "Visual Studio 17 2022" -A Win32 -D BUILD_SHARED_LIBS=ON
|
||||
run: cmake -B build-win32-shared-x86 -A Win32 -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build Win32 shared x86 library
|
||||
run: cmake --build build-win32-shared-x86 --parallel
|
||||
|
||||
- name: Configure Win32 static x64 library
|
||||
run: cmake -B build-win32-static-x64 -G "Visual Studio 17 2022" -A x64
|
||||
run: cmake -B build-win32-static-x64 -A x64
|
||||
- name: Build Win32 static x64 library
|
||||
run: cmake --build build-win32-static-x64 --parallel
|
||||
|
||||
- name: Configure Win32 shared x64 library
|
||||
run: cmake -B build-win32-shared-x64 -G "Visual Studio 17 2022" -A x64 -D BUILD_SHARED_LIBS=ON
|
||||
run: cmake -B build-win32-shared-x64 -A x64 -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build Win32 shared x64 library
|
||||
run: cmake --build build-win32-shared-x64 --parallel
|
||||
|
||||
|
||||
+2
-2
@@ -57,11 +57,11 @@ src/glfw3ConfigVersion.cmake
|
||||
# Compiled binaries
|
||||
src/libglfw.so
|
||||
src/libglfw.so.3
|
||||
src/libglfw.so.3.5
|
||||
src/libglfw.so.3.6
|
||||
src/libglfw.dylib
|
||||
src/libglfw.dylib
|
||||
src/libglfw.3.dylib
|
||||
src/libglfw.3.5.dylib
|
||||
src/libglfw.3.6.dylib
|
||||
src/libglfw3.a
|
||||
src/glfw3.lib
|
||||
src/glfw3.dll
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.16...3.28 FATAL_ERROR)
|
||||
|
||||
project(GLFW VERSION 3.5.0 LANGUAGES C HOMEPAGE_URL "https://www.glfw.org/")
|
||||
project(GLFW VERSION 3.6.0 LANGUAGES C HOMEPAGE_URL "https://www.glfw.org/")
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ excludes other invaluable contributions like language bindings and text and
|
||||
video tutorials.
|
||||
|
||||
- Bobyshev Alexander
|
||||
- Alzathar
|
||||
- Laurent Aphecetche
|
||||
- Matt Arsenault
|
||||
- Takuro Ashie
|
||||
@@ -56,6 +57,7 @@ video tutorials.
|
||||
- Bill Currie
|
||||
- Jason Daly
|
||||
- danhambleton
|
||||
- danijel1023
|
||||
- Jarrod Davis
|
||||
- Aaron Day
|
||||
- decce
|
||||
@@ -98,6 +100,7 @@ video tutorials.
|
||||
- Andrew Gutekanst
|
||||
- Stephen Gutekanst
|
||||
- Jonathan Hale
|
||||
- halx99
|
||||
- Daniel Hauser
|
||||
- hdf89shfdfs
|
||||
- Moritz Heinemann
|
||||
@@ -181,6 +184,7 @@ video tutorials.
|
||||
- Jon Morton
|
||||
- Pierre Moulon
|
||||
- Martins Mozeiko
|
||||
- Tomáš Mráz
|
||||
- Pascal Muetschard
|
||||
- James Murphy
|
||||
- Julian Møller
|
||||
@@ -227,6 +231,7 @@ video tutorials.
|
||||
- Philip Rideout
|
||||
- Eddie Ringle
|
||||
- Max Risuhin
|
||||
- road2react
|
||||
- Joe Roback
|
||||
- Jorge Rodriguez
|
||||
- Jari Ronkainen
|
||||
@@ -234,6 +239,7 @@ video tutorials.
|
||||
- Ed Ropple
|
||||
- Aleksey Rybalkin
|
||||
- Mikko Rytkönen
|
||||
- saikyun
|
||||
- Riku Salminen
|
||||
- Yoshinori Sano
|
||||
- Brandon Schaefer
|
||||
|
||||
@@ -118,57 +118,9 @@ guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
|
||||
information on what to include when reporting a bug.
|
||||
|
||||
|
||||
## Changelog since 3.4
|
||||
## Changelog since 3.5
|
||||
|
||||
- Added `GLFW_UNLIMITED_MOUSE_BUTTONS` input mode that allows mouse buttons beyond
|
||||
the limit of the mouse button tokens to be reported (#2423)
|
||||
- Added `glfwGetEGLConfig` function to query the `EGLConfig` of a window (#2045)
|
||||
- Added `glfwGetGLXFBConfig` function to query the `GLXFBConfig` of a window (#1925)
|
||||
- Updated minimum CMake version to 3.16 (#2541)
|
||||
- Removed support for building with original MinGW (#2540)
|
||||
- [Win32] Removed support for Windows XP and Vista (#2505)
|
||||
- [Cocoa] Added `QuartzCore` framework as link-time dependency
|
||||
- [Cocoa] Removed support for OS X 10.10 Yosemite and earlier (#2506)
|
||||
- [Wayland] Bugfix: The fractional scaling related objects were not destroyed
|
||||
- [Wayland] Bugfix: `glfwInit` would segfault on compositor with no seat (#2517)
|
||||
- [Wayland] Bugfix: A drag entering a non-GLFW surface could cause a segfault
|
||||
- [Wayland] Bugfix: Ignore key repeat events when no window has keyboard focus (#2727)
|
||||
- [Wayland] Bugfix: Reset key repeat timer when window destroyed (#2741,#2727)
|
||||
- [Wayland] Bugfix: Memory would leak if reading a data offer failed midway
|
||||
- [Wayland] Bugfix: Retrieved cursor position would be incorrect when hovering over
|
||||
fallback decorations
|
||||
- [Wayland] Bugfix: Fallback decorations would report scroll events
|
||||
- [Wayland] Bugfix: Keyboard repeat events halted when any key is released (#2568)
|
||||
- [Wayland] Bugfix: Fallback decorations would show menu at wrong position
|
||||
- [Wayland] Bugfix: The cursor was not updated when clicking through from
|
||||
a modal to a fallback decoration
|
||||
- [Wayland] Bugfix: The cursor position was not updated when clicking through
|
||||
from a modal to the content area
|
||||
- [Wayland] Bugfix: free modules at end of terminate function to resolve
|
||||
potential segmentation fault (#2744)
|
||||
- [Wayland] Bugfix: Confining or disabling the cursor could segfault on
|
||||
compositors without `pointer-constraints-unstable-v1`
|
||||
- [Wayland] Bugfix: Key repeat did not function on very old compositors
|
||||
- [Wayland] Bugfix: The `libwayland-client` library was not unloaded at termination
|
||||
- [Wayland] Bugfix: Scroll events were sent twice on some versions of GNOME (#2494)
|
||||
- [Wayland] Bugfix: Two-dimensional scroll input was emitted as separate axes
|
||||
- [Wayland] Bugfix: Mouse wheel scroll distance was incorrect on some compositors
|
||||
- [Wayland] Bugfix: `glfwSwapBuffers` would halt with nonzero swap interval when window
|
||||
was suspended (#1350,#2582,#2640,#2719,#2723,#2800,#2827)
|
||||
- [Wayland] Bugfix: `glfwPostEmptyEvent` would leak a callback proxy (#2836)
|
||||
- [Wayland] Bugfix: `glfwHideWindow` did not always send its request immediately
|
||||
- [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
|
||||
- [X11] Bugfix: Occasional crash when an idle display awakes (#2766)
|
||||
- [X11] Bugfix: Prevent BadWindow when creating small windows with a content scale
|
||||
less than 1 (#2754)
|
||||
- [X11] Bugfix: Clamp width and height to >= 1 to prevent BadValue error and app exit
|
||||
- [X11] Bugfix: Floating windows silently became non-floating when hidden (#2276)
|
||||
- [X11] Bugfix: The `libXext` library was not unloaded at termination
|
||||
- [Linux] Bugfix: The header for `ioctl` was only implicitly included (#2778)
|
||||
- [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
|
||||
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
||||
- [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to
|
||||
`GLFW_NATIVE_CONTEXT_API` (#2518)
|
||||
None.
|
||||
|
||||
|
||||
## Contact
|
||||
|
||||
+1
-1
@@ -310,7 +310,7 @@ With a few changes to your `CMakeLists.txt` you can locate the package and
|
||||
target files generated when GLFW is installed.
|
||||
|
||||
```cmake
|
||||
find_package(glfw3 3.5 REQUIRED)
|
||||
find_package(glfw3 3.6 REQUIRED)
|
||||
```
|
||||
|
||||
Once GLFW has been added to the project, link against it with the `glfw` target.
|
||||
|
||||
+3
-3
@@ -621,17 +621,17 @@ The format of the string is as follows:
|
||||
- The names of the always supported context creation APIs EGL and OSMesa
|
||||
- Any additional compile-time options, APIs and (on Windows) what compiler was used
|
||||
|
||||
For example, compiling GLFW 3.5 with MinGW-64 as a DLL for Windows, may result
|
||||
For example, compiling GLFW 3.6 with MinGW-64 as a DLL for Windows, may result
|
||||
in a version string like this:
|
||||
|
||||
```c
|
||||
3.5.0 Win32 WGL Null EGL OSMesa MinGW-w64 DLL
|
||||
3.6.0 Win32 WGL Null EGL OSMesa MinGW-w64 DLL
|
||||
```
|
||||
|
||||
Compiling GLFW as a static library for Linux, with both Wayland and X11 enabled, may
|
||||
result in a version string like this:
|
||||
|
||||
```c
|
||||
3.5.0 Wayland X11 GLX Null EGL OSMesa monotonic
|
||||
3.6.0 Wayland X11 GLX Null EGL OSMesa monotonic
|
||||
```
|
||||
|
||||
|
||||
+2
-44
@@ -1,69 +1,27 @@
|
||||
# Release notes for version 3.5 {#news}
|
||||
# Release notes for version 3.6 {#news}
|
||||
|
||||
[TOC]
|
||||
|
||||
|
||||
## New features {#features}
|
||||
|
||||
### Unlimited mouse buttons {#unlimited_mouse_buttons}
|
||||
|
||||
GLFW now has an input mode which allows an unlimited number of mouse buttons to
|
||||
be reported by the mouse buttton callback, rather than just the associated
|
||||
[mouse button tokens](@ref buttons). This allows using mouse buttons with
|
||||
values over 8. For compatibility with older versions, the
|
||||
@ref GLFW_UNLIMITED_MOUSE_BUTTONS input mode needs to be set to make use of
|
||||
this.
|
||||
|
||||
|
||||
### EGLConfig native access function {#eglconfig}
|
||||
|
||||
GLFW now provides the @ref glfwGetEGLConfig native access function for querying
|
||||
the `EGLConfig` of a window that has a `EGLSurface`.
|
||||
|
||||
|
||||
### GLXFBConfig native access function {#glxfbconfig}
|
||||
|
||||
GLFW now provides the @ref glfwGetGLXFBConfig native access function for
|
||||
querying the `GLXFBConfig` of a window that has a `GLXWindow`.
|
||||
|
||||
|
||||
## Caveats {#caveats}
|
||||
|
||||
## Deprecations {#deprecations}
|
||||
|
||||
## Removals {#removals}
|
||||
|
||||
### Windows XP and Vista support has been removed {#winxp_vista}
|
||||
|
||||
Support for Windows XP and Vista has been removed. Windows XP has been out of extended
|
||||
support since 2014.
|
||||
|
||||
|
||||
### Original MinGW support has been removed {#original_mingw}
|
||||
|
||||
Support for the now unmaintained original MinGW distribution has been removed.
|
||||
|
||||
This does not apply to the much more capable [MinGW-w64](https://www.mingw-w64.org/),
|
||||
which remains fully supported. MinGW-w64 can build both 32- and 64-bit binaries, is
|
||||
actively maintained and available on many platforms.
|
||||
|
||||
|
||||
## New symbols {#new_symbols}
|
||||
|
||||
### New functions {#new_functions}
|
||||
|
||||
- @ref glfwGetEGLConfig
|
||||
- @ref glfwGetGLXFBConfig
|
||||
|
||||
|
||||
### New types {#new_types}
|
||||
|
||||
### New constants {#new_constants}
|
||||
|
||||
- @ref GLFW_UNLIMITED_MOUSE_BUTTONS
|
||||
|
||||
## Release notes for earlier versions {#news_archive}
|
||||
|
||||
- [Release notes for 3.5](https://www.glfw.org/docs/3.5/news.html)
|
||||
- [Release notes for 3.4](https://www.glfw.org/docs/3.4/news.html)
|
||||
- [Release notes for 3.3](https://www.glfw.org/docs/3.3/news.html)
|
||||
- [Release notes for 3.2](https://www.glfw.org/docs/3.2/news.html)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*************************************************************************
|
||||
* GLFW 3.5 - www.glfw.org
|
||||
* GLFW 3.6 - www.glfw.org
|
||||
* A library for OpenGL, window and input
|
||||
*------------------------------------------------------------------------
|
||||
* Copyright (c) 2002-2006 Marcus Geelnard
|
||||
@@ -291,7 +291,7 @@ extern "C" {
|
||||
* features are added to the API but it remains backward-compatible.
|
||||
* @ingroup init
|
||||
*/
|
||||
#define GLFW_VERSION_MINOR 5
|
||||
#define GLFW_VERSION_MINOR 6
|
||||
/*! @brief The revision number of the GLFW header.
|
||||
*
|
||||
* The revision number of the GLFW header. This is incremented when a bug fix
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*************************************************************************
|
||||
* GLFW 3.5 - www.glfw.org
|
||||
* GLFW 3.6 - www.glfw.org
|
||||
* A library for OpenGL, window and input
|
||||
*------------------------------------------------------------------------
|
||||
* Copyright (c) 2002-2006 Marcus Geelnard
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Cocoa - www.glfw.org
|
||||
// GLFW 3.6 Cocoa - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Cocoa - www.glfw.org
|
||||
// GLFW 3.6 Cocoa - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Cocoa - www.glfw.org
|
||||
// GLFW 3.6 Cocoa - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
// Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Cocoa - www.glfw.org
|
||||
// GLFW 3.6 Cocoa - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Cocoa - www.glfw.org
|
||||
// GLFW 3.6 Cocoa - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+29
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Cocoa - www.glfw.org
|
||||
// GLFW 3.6 Cocoa - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
@@ -599,6 +599,34 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
_glfwInputKey(window, key, [event keyCode], GLFW_RELEASE, mods);
|
||||
}
|
||||
|
||||
- (BOOL)performKeyEquivalent:(NSEvent *)event
|
||||
{
|
||||
// HACK: Some key combinations are consumed before reaching keyDown:
|
||||
// so we claim those events and emit them here
|
||||
const int key = translateKey([event keyCode]);
|
||||
const int mods = translateFlags([event modifierFlags]);
|
||||
|
||||
if (mods & GLFW_MOD_CONTROL)
|
||||
{
|
||||
if (key == GLFW_KEY_TAB || key == GLFW_KEY_ESCAPE)
|
||||
{
|
||||
_glfwInputKey(window, key, [event keyCode], GLFW_PRESS, mods);
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
if (mods & GLFW_MOD_SUPER)
|
||||
{
|
||||
if (key == GLFW_KEY_PERIOD)
|
||||
{
|
||||
_glfwInputKey(window, key, [event keyCode], GLFW_PRESS, mods);
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
return [super performKeyEquivalent:event];
|
||||
}
|
||||
|
||||
- (void)scrollWheel:(NSEvent *)event
|
||||
{
|
||||
double deltaX = [event scrollingDeltaX];
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2016 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 EGL - www.glfw.org
|
||||
// GLFW 3.6 EGL - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 GLX - www.glfw.org
|
||||
// GLFW 3.6 GLX - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Linux - www.glfw.org
|
||||
// GLFW 3.6 Linux - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Linux - www.glfw.org
|
||||
// GLFW 3.6 Linux - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 macOS - www.glfw.org
|
||||
// GLFW 3.6 macOS - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2009-2016 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 macOS - www.glfw.org
|
||||
// GLFW 3.6 macOS - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2009-2021 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 macOS - www.glfw.org
|
||||
// GLFW 3.6 macOS - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2016 Google Inc.
|
||||
// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2016 Google Inc.
|
||||
// Copyright (c) 2016-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2016 Google Inc.
|
||||
// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2016 Google Inc.
|
||||
// Copyright (c) 2016-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 OSMesa - www.glfw.org
|
||||
// GLFW 3.6 OSMesa - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2016 Google Inc.
|
||||
// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 POSIX - www.glfw.org
|
||||
// GLFW 3.6 POSIX - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2021 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 POSIX - www.glfw.org
|
||||
// GLFW 3.6 POSIX - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2022 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 POSIX - www.glfw.org
|
||||
// GLFW 3.6 POSIX - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2022 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 POSIX - www.glfw.org
|
||||
// GLFW 3.6 POSIX - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 POSIX - www.glfw.org
|
||||
// GLFW 3.6 POSIX - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 POSIX - www.glfw.org
|
||||
// GLFW 3.6 POSIX - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 POSIX - www.glfw.org
|
||||
// GLFW 3.6 POSIX - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 WGL - www.glfw.org
|
||||
// GLFW 3.6 WGL - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2021 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+6
-5
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Win32 - www.glfw.org
|
||||
// GLFW 3.6 Win32 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
@@ -711,11 +711,12 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l
|
||||
const int mods = getKeyMods();
|
||||
|
||||
scancode = (HIWORD(lParam) & (KF_EXTENDED | 0xff));
|
||||
if (!scancode)
|
||||
if (!(scancode & 0xff))
|
||||
{
|
||||
// NOTE: Some synthetic key messages have a scancode of zero
|
||||
// HACK: Map the virtual key back to a usable scancode
|
||||
scancode = MapVirtualKeyW((UINT) wParam, MAPVK_VK_TO_VSC);
|
||||
// NOTE: Both media keys and the synthetic key messages from Windows
|
||||
// Clipboard History are reported with a scancode of zero
|
||||
// HACK: Map the virtual key to a scancode but preserve extended bit
|
||||
scancode |= MapVirtualKeyW((UINT) wParam, MAPVK_VK_TO_VSC);
|
||||
}
|
||||
|
||||
// HACK: Alt+PrtSc has a different scancode than just PrtSc
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 - www.glfw.org
|
||||
// GLFW 3.6 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+4
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Wayland - www.glfw.org
|
||||
// GLFW 3.6 Wayland - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||
//
|
||||
@@ -798,6 +798,8 @@ int _glfwInitWayland(void)
|
||||
_glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_unset_capabilities");
|
||||
_glfw.wl.libdecor.libdecor_frame_set_visibility_ = (PFN_libdecor_frame_set_visibility)
|
||||
_glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_visibility");
|
||||
_glfw.wl.libdecor.libdecor_frame_is_visible_ = (PFN_libdecor_frame_is_visible)
|
||||
_glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_is_visible");
|
||||
_glfw.wl.libdecor.libdecor_frame_get_xdg_toplevel_ = (PFN_libdecor_frame_get_xdg_toplevel)
|
||||
_glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_get_xdg_toplevel");
|
||||
_glfw.wl.libdecor.libdecor_configuration_get_content_size_ = (PFN_libdecor_configuration_get_content_size)
|
||||
@@ -829,6 +831,7 @@ int _glfwInitWayland(void)
|
||||
!_glfw.wl.libdecor.libdecor_frame_set_capabilities_ ||
|
||||
!_glfw.wl.libdecor.libdecor_frame_unset_capabilities_ ||
|
||||
!_glfw.wl.libdecor.libdecor_frame_set_visibility_ ||
|
||||
!_glfw.wl.libdecor.libdecor_frame_is_visible_ ||
|
||||
!_glfw.wl.libdecor.libdecor_frame_get_xdg_toplevel_ ||
|
||||
!_glfw.wl.libdecor.libdecor_configuration_get_content_size_ ||
|
||||
!_glfw.wl.libdecor.libdecor_configuration_get_window_state_ ||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Wayland - www.glfw.org
|
||||
// GLFW 3.6 Wayland - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||
//
|
||||
|
||||
+4
-2
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Wayland - www.glfw.org
|
||||
// GLFW 3.6 Wayland - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||
//
|
||||
@@ -311,6 +311,7 @@ typedef void (* PFN_libdecor_frame_unset_maximized)(struct libdecor_frame*);
|
||||
typedef void (* PFN_libdecor_frame_set_capabilities)(struct libdecor_frame*,enum libdecor_capabilities);
|
||||
typedef void (* PFN_libdecor_frame_unset_capabilities)(struct libdecor_frame*,enum libdecor_capabilities);
|
||||
typedef void (* PFN_libdecor_frame_set_visibility)(struct libdecor_frame*,bool visible);
|
||||
typedef bool (* PFN_libdecor_frame_is_visible)(struct libdecor_frame*);
|
||||
typedef struct xdg_toplevel* (* PFN_libdecor_frame_get_xdg_toplevel)(struct libdecor_frame*);
|
||||
typedef bool (* PFN_libdecor_configuration_get_content_size)(struct libdecor_configuration*,struct libdecor_frame*,int*,int*);
|
||||
typedef bool (* PFN_libdecor_configuration_get_window_state)(struct libdecor_configuration*,enum libdecor_window_state*);
|
||||
@@ -336,6 +337,7 @@ typedef void (* PFN_libdecor_state_free)(struct libdecor_state*);
|
||||
#define libdecor_frame_set_capabilities _glfw.wl.libdecor.libdecor_frame_set_capabilities_
|
||||
#define libdecor_frame_unset_capabilities _glfw.wl.libdecor.libdecor_frame_unset_capabilities_
|
||||
#define libdecor_frame_set_visibility _glfw.wl.libdecor.libdecor_frame_set_visibility_
|
||||
#define libdecor_frame_is_visible _glfw.wl.libdecor.libdecor_frame_is_visible_
|
||||
#define libdecor_frame_get_xdg_toplevel _glfw.wl.libdecor.libdecor_frame_get_xdg_toplevel_
|
||||
#define libdecor_configuration_get_content_size _glfw.wl.libdecor.libdecor_configuration_get_content_size_
|
||||
#define libdecor_configuration_get_window_state _glfw.wl.libdecor.libdecor_configuration_get_window_state_
|
||||
@@ -375,7 +377,6 @@ typedef struct _GLFWwindowWayland
|
||||
GLFWbool transparent;
|
||||
GLFWbool scaleFramebuffer;
|
||||
struct wl_surface* surface;
|
||||
struct wl_callback* callback;
|
||||
|
||||
struct {
|
||||
struct wl_event_queue* queue;
|
||||
@@ -616,6 +617,7 @@ typedef struct _GLFWlibraryWayland
|
||||
PFN_libdecor_frame_set_capabilities libdecor_frame_set_capabilities_;
|
||||
PFN_libdecor_frame_unset_capabilities libdecor_frame_unset_capabilities_;
|
||||
PFN_libdecor_frame_set_visibility libdecor_frame_set_visibility_;
|
||||
PFN_libdecor_frame_is_visible libdecor_frame_is_visible_;
|
||||
PFN_libdecor_frame_get_xdg_toplevel libdecor_frame_get_xdg_toplevel_;
|
||||
PFN_libdecor_configuration_get_content_size libdecor_configuration_get_content_size_;
|
||||
PFN_libdecor_configuration_get_window_state libdecor_configuration_get_window_state_;
|
||||
|
||||
+50
-39
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 Wayland - www.glfw.org
|
||||
// GLFW 3.6 Wayland - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||
//
|
||||
@@ -24,7 +24,9 @@
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#if !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
@@ -476,8 +478,9 @@ static void resizeFramebuffer(_GLFWwindow* window)
|
||||
{
|
||||
if (window->wl.fractionalScale)
|
||||
{
|
||||
window->wl.fbWidth = (window->wl.width * window->wl.scalingNumerator) / 120;
|
||||
window->wl.fbHeight = (window->wl.height * window->wl.scalingNumerator) / 120;
|
||||
// Round halfway away from zero per fractional-scale-v1 protocol spec
|
||||
window->wl.fbWidth = (window->wl.width * window->wl.scalingNumerator + 60) / 120;
|
||||
window->wl.fbHeight = (window->wl.height * window->wl.scalingNumerator + 60) / 120;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -894,6 +897,10 @@ void libdecorFrameHandleConfigure(struct libdecor_frame* frame,
|
||||
libdecor_frame_commit(frame, frameState, config);
|
||||
libdecor_state_free(frameState);
|
||||
|
||||
// NOTE: Frame visibility must only be set after a frame state has been committed
|
||||
if (window->decorated != libdecor_frame_is_visible(window->wl.libdecor.frame))
|
||||
libdecor_frame_set_visibility(window->wl.libdecor.frame, window->decorated);
|
||||
|
||||
if (window->wl.activated != activated)
|
||||
{
|
||||
window->wl.activated = activated;
|
||||
@@ -975,36 +982,39 @@ static GLFWbool createLibdecorFrame(_GLFWwindow* window)
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
struct libdecor_state* frameState =
|
||||
libdecor_state_new(window->wl.width, window->wl.height);
|
||||
libdecor_frame_commit(window->wl.libdecor.frame, frameState, NULL);
|
||||
libdecor_state_free(frameState);
|
||||
|
||||
if (strlen(window->wl.appId))
|
||||
libdecor_frame_set_app_id(window->wl.libdecor.frame, window->wl.appId);
|
||||
|
||||
libdecor_frame_set_title(window->wl.libdecor.frame, window->title);
|
||||
|
||||
if (window->minwidth != GLFW_DONT_CARE &&
|
||||
window->minheight != GLFW_DONT_CARE)
|
||||
if (window->resizable)
|
||||
{
|
||||
libdecor_frame_set_min_content_size(window->wl.libdecor.frame,
|
||||
window->minwidth,
|
||||
window->minheight);
|
||||
}
|
||||
if (window->minwidth != GLFW_DONT_CARE &&
|
||||
window->minheight != GLFW_DONT_CARE)
|
||||
{
|
||||
libdecor_frame_set_min_content_size(window->wl.libdecor.frame,
|
||||
window->minwidth,
|
||||
window->minheight);
|
||||
}
|
||||
|
||||
if (window->maxwidth != GLFW_DONT_CARE &&
|
||||
window->maxheight != GLFW_DONT_CARE)
|
||||
{
|
||||
libdecor_frame_set_max_content_size(window->wl.libdecor.frame,
|
||||
window->maxwidth,
|
||||
window->maxheight);
|
||||
if (window->maxwidth != GLFW_DONT_CARE &&
|
||||
window->maxheight != GLFW_DONT_CARE)
|
||||
{
|
||||
libdecor_frame_set_max_content_size(window->wl.libdecor.frame,
|
||||
window->maxwidth,
|
||||
window->maxheight);
|
||||
}
|
||||
}
|
||||
|
||||
if (!window->resizable)
|
||||
else
|
||||
{
|
||||
libdecor_frame_unset_capabilities(window->wl.libdecor.frame,
|
||||
LIBDECOR_ACTION_RESIZE);
|
||||
libdecor_frame_set_min_content_size(window->wl.libdecor.frame,
|
||||
window->wl.width,
|
||||
window->wl.height);
|
||||
libdecor_frame_set_max_content_size(window->wl.libdecor.frame,
|
||||
window->wl.width,
|
||||
window->wl.height);
|
||||
}
|
||||
|
||||
if (window->monitor)
|
||||
@@ -1015,12 +1025,11 @@ static GLFWbool createLibdecorFrame(_GLFWwindow* window)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Frame visibility is applied in libdecorFrameHandleConfigure
|
||||
|
||||
if (window->wl.maximized)
|
||||
libdecor_frame_set_maximized(window->wl.libdecor.frame);
|
||||
|
||||
if (!window->decorated)
|
||||
libdecor_frame_set_visibility(window->wl.libdecor.frame, false);
|
||||
|
||||
setIdleInhibitor(window, GLFW_FALSE);
|
||||
}
|
||||
|
||||
@@ -1373,24 +1382,27 @@ static void handleEvents(double* timeout)
|
||||
#endif
|
||||
|
||||
GLFWbool event = GLFW_FALSE;
|
||||
enum { DISPLAY_FD, KEYREPEAT_FD, CURSOR_FD, LIBDECOR_FD };
|
||||
enum { DISPLAY_FD, KEYREPEAT_FD, CURSOR_FD };
|
||||
struct pollfd fds[] =
|
||||
{
|
||||
[DISPLAY_FD] = { wl_display_get_fd(_glfw.wl.display), POLLIN },
|
||||
[KEYREPEAT_FD] = { _glfw.wl.keyRepeatTimerfd, POLLIN },
|
||||
[CURSOR_FD] = { _glfw.wl.cursorTimerfd, POLLIN },
|
||||
[LIBDECOR_FD] = { -1, POLLIN }
|
||||
[CURSOR_FD] = { _glfw.wl.cursorTimerfd, POLLIN }
|
||||
};
|
||||
|
||||
if (_glfw.wl.libdecor.context)
|
||||
fds[LIBDECOR_FD].fd = libdecor_get_fd(_glfw.wl.libdecor.context);
|
||||
|
||||
while (!event)
|
||||
{
|
||||
if (_glfw.wl.libdecor.context)
|
||||
{
|
||||
// Dispatch unconditionally because it also processes non-Wayland events
|
||||
if (libdecor_dispatch(_glfw.wl.libdecor.context, 0) > 0)
|
||||
event = GLFW_TRUE;
|
||||
}
|
||||
|
||||
while (wl_display_prepare_read(_glfw.wl.display) != 0)
|
||||
{
|
||||
if (wl_display_dispatch_pending(_glfw.wl.display) > 0)
|
||||
return;
|
||||
event = GLFW_TRUE;
|
||||
}
|
||||
|
||||
// If an error other than EAGAIN happens, we have likely been disconnected
|
||||
@@ -1409,6 +1421,11 @@ static void handleEvents(double* timeout)
|
||||
return;
|
||||
}
|
||||
|
||||
double immediate = 0.0;
|
||||
|
||||
if (event)
|
||||
timeout = &immediate;
|
||||
|
||||
if (!_glfwPollPOSIX(fds, sizeof(fds) / sizeof(fds[0]), timeout))
|
||||
{
|
||||
wl_display_cancel_read(_glfw.wl.display);
|
||||
@@ -1455,12 +1472,6 @@ static void handleEvents(double* timeout)
|
||||
if (read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats)) == 8)
|
||||
incrementCursorImage();
|
||||
}
|
||||
|
||||
if (fds[LIBDECOR_FD].revents & POLLIN)
|
||||
{
|
||||
if (libdecor_dispatch(_glfw.wl.libdecor.context, 0) > 0)
|
||||
event = GLFW_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 X11 - www.glfw.org
|
||||
// GLFW 3.6 X11 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 X11 - www.glfw.org
|
||||
// GLFW 3.6 X11 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 X11 - www.glfw.org
|
||||
// GLFW 3.6 X11 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 X11 - www.glfw.org
|
||||
// GLFW 3.6 X11 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//========================================================================
|
||||
// GLFW 3.5 X11 - www.glfw.org
|
||||
// GLFW 3.6 X11 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
Reference in New Issue
Block a user