1
0
mirror of synced 2024-12-14 16:52:53 +01:00
ImHex/lib/libimhex/include/hex/helpers
David Mentler 751eff0edf
impr: Restore native macOS title bar double click gesture in borderless mode (#1689)
### Problem description

#### Problem 1
In borderless mode ImHex disables the standard macOS titlebar rendering
and input processing. As a result double clicking the titlebar does not
trigger the native macOS behavior set in `System Settings -> Desktop &
Dock -> Double-click a window's title bar to [Zoom/Minimize/Do
nothing]`.

#### Problem 2
The ImHex window shows up as blank/transparent when de-minimizing it
from the dock.

#### Problem 3
Widgets experience ghost hover inputs from the past position of the
cursor during live resizing.

### Implementation description
ImGui elements consume input events in the order they are drawn. As a
result by "drawing" an `InvisibleButton` over the content area of the
titlebar we can catch unprocessed clicks in the titlebar area.
Connecting this button's double clicks to the native window is then a
trivial endeavour.

The blank windows was caused by the rendering stack clearing the GL
buffer, but proceeding to draw nothing in it. I have short circuited
this path.

Ghost hover inputs were squelched by consistently moving the ImGui
cursor to `0, 0` during a live resize. The OS will dispatch a cursor
positioning event once the resizing ends, restoring normal behavior.

### Screenshots
N/A

### Additional things
N/A

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-05-20 11:27:57 +02:00
..
auto_reset.hpp fix: Settings not being written anymore after restart 2024-05-18 20:32:34 +02:00
binary_pattern.hpp refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
concepts.hpp impr: General code cleanup 2023-11-10 20:47:08 +01:00
crypto.hpp impr: General code cleanup 2023-11-10 20:47:08 +01:00
debugging.hpp impr: Cleanup welcome screen 2023-12-18 11:03:19 +01:00
encoding_file.hpp impr: Allow custom encodings with only single-byte characters to be displayed immediately 2024-01-27 16:49:31 +01:00
fmt.hpp impr: Further improve compile times 2023-11-30 14:40:07 +01:00
fs.hpp impr: Move advanced analysis yara rules to the patterns repo 2024-02-25 11:32:05 +01:00
http_requests_emscripten.hpp build: Added precompiled headers 2024-02-29 19:57:20 +01:00
http_requests_native.hpp fix: Build with precompiled headers for WebAssembly 2024-02-29 21:29:26 +01:00
http_requests.hpp refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
intrinsics.hpp impr: General code cleanup 2023-11-10 20:47:08 +01:00
literals.hpp impr: General code cleanup 2023-11-10 20:47:08 +01:00
logger.hpp impr: Optimize includes in logger 2024-03-25 20:37:19 +01:00
magic.hpp impr: Refactor and modularize data information view 2024-02-21 00:06:52 +01:00
opengl.hpp refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
patches.hpp refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
tar.hpp build: Restructured entire custom plugin system (#1469) 2023-12-22 23:39:38 +01:00
types.hpp impr: Don't allow opening the same file twice 2024-02-24 12:06:06 +01:00
utils_linux.hpp impr: Use execvp() instead of system() on Linux (#1170) 2023-07-05 20:50:46 +02:00
utils_macos.hpp impr: Restore native macOS title bar double click gesture in borderless mode (#1689) 2024-05-20 11:27:57 +02:00
utils.hpp fix: Misspelling of Endianness (#1609) 2024-03-28 22:25:28 +01:00