1
0
mirror of synced 2024-12-14 08:42:54 +01:00
ImHex/lib/libimhex/include/hex
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
..
api feat: Added option to specify max file size to load into memory 2024-05-19 15:10:22 +02:00
data_processor refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
helpers impr: Restore native macOS title bar double click gesture in borderless mode (#1689) 2024-05-20 11:27:57 +02:00
providers impr: Allow providers to be closed quicker after being opened 2024-05-17 21:56:43 +02:00
subcommands impr: General code cleanup 2023-11-10 20:47:08 +01:00
test tests: Add infrastructure for testing plugins (#1538) 2024-02-26 20:51:08 +01:00
ui impr: Allow views to opt out of having their open state saved 2024-05-19 21:51:55 +02:00
api_urls.hpp impr: General code cleanup 2023-11-10 20:47:08 +01:00
plugin.hpp impr: Display background scripts in about page 2024-05-08 22:30:53 +02:00