Commit graph

598 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
8b3b554de2
Panic instead of erroring when compositor channel unexpectedly closes 2025-01-14 11:18:08 +00:00
Héctor Ramón Jiménez
2086fc0d6b
Simplify type annotations in winit::program 2025-01-06 22:48:09 +01:00
Héctor Ramón Jiménez
6daba88029
Initialize Compositor lazily in winit shell
... and get rid of the ghost boot window!
2025-01-06 22:37:42 +01:00
Héctor Ramón Jiménez
a0acaba866
Use "outer" positions in all window-related operations 2025-01-06 20:13:51 +01:00
Héctor Ramón Jiménez
2cf4abf25b
Support custom renderers in iced_test through renderer::Headless trait 2024-12-14 03:49:24 +01:00
Héctor Ramón Jiménez
1aeb317f2d
Add image and hash snapshot-based testing to iced_test 2024-12-10 04:51:08 +01:00
Ian Douglas Scott
3fc57b7d95 Remove surface argument of Compositor::screenshot
This argument was completely ignored by the wgpu renderer, and used only
for the `clip_mask` by the `tiny_skia` renderer. I believe creating a
new clip mask is correct.

This way it's possible to render offscreen without needing a surface.
2024-11-21 16:26:17 -08:00
Héctor Ramón Jiménez
14ec330730
Replace reactive-rendering feature with unconditional-rendering 2024-11-05 23:52:59 +01:00
Héctor Ramón Jiménez
c6af79a1d0
Fix deferred layout on resize after drawing 2024-11-05 23:52:58 +01:00
Héctor Ramón Jiménez
7908b6eba9
Request a redraw when a window is resized
If we do not request it, macOS does not get any
`RedrawRequested` events. Shouldn't `winit`
[take care of this]? Probably a bug.

[take care of this]: https://docs.rs/winit/0.30.5/winit/event/enum.WindowEvent.html#variant.RedrawRequested
2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
0691e617f3
Fix WindowManager::is_idle in iced_winit 2024-11-05 23:52:57 +01:00
Héctor Ramón Jiménez
52490397d6
Implement reactive-rendering for text_input
... and fix the redraw queue logic in `iced_winit`.
2024-11-05 23:52:56 +01:00
Héctor Ramón Jiménez
3ba7c71e3f
Implement reactive-rendering for slider 2024-11-05 23:52:56 +01:00
Héctor Ramón Jiménez
97bcca0400
Remove TODO about reactive rendering in iced_winit 2024-11-05 23:52:56 +01:00
Héctor Ramón Jiménez
5c33ce18ed
Draft reactive-rendering feature for button 2024-11-05 23:52:56 +01:00
kosayoda
6ed88f7608 Prevent unintended keyboard input during focus. 2024-10-24 16:12:18 -04:00
Héctor Ramón Jiménez
32cdc99e92
Add modified_key to keyboard::Event::KeyReleased 2024-10-02 16:53:10 +02:00
ibaryshnikov
8b34f99b02 added physical_key to KeyReleased event 2024-09-26 17:13:32 +03:00
Héctor Ramón Jiménez
40ea3dabff
Bump version to 0.13.0 🎉 2024-09-18 02:38:49 +02:00
Jindřich Moravec
cadc054651
Disable drag_and_drop attribute for boot window 2024-09-14 00:21:51 +02:00
Richard
d46f6f92ce
Fix wasm32 deployments not displaying anything (#2574)
* reuse `canvas` element generated by dummy window

* fix formatting

* set `control_flow` to `Poll` in `resumed`

this is mostly a fix for Chrome

* Avoid blowing up memory when booting up on Wasm

---------

Co-authored-by: Héctor Ramón Jiménez <hector@hecrj.dev>
2024-09-13 22:15:15 +00:00
Héctor Ramón
e9e8e83cca
Merge pull request #2551 from airstrike/mouse-interactions
Expose additional mouse interaction cursors
2024-09-13 17:07:56 +02:00
Héctor Ramón Jiménez
d4b9b4720f
Add Copy and Help variants to mouse::Interaction 2024-09-13 16:58:44 +02:00
Héctor Ramón Jiménez
1cbedfaac7
Rename ResizingDiagonal* to ResizingDiagonally* 2024-09-13 16:55:40 +02:00
Héctor Ramón Jiménez
94c8b9639c
Add modified_key to keyboard::Event 2024-09-13 03:10:40 +02:00
Héctor Ramón Jiménez
cbe91d4a7c
Add physical_key to keyboard::Event
Co-authored-by: Exidex <16986685+Exidex@users.noreply.github.com>
2024-09-13 03:02:07 +02:00
Héctor Ramón Jiménez
c66355f289
Enter Runtime when calling Program::subscription 2024-09-13 01:48:15 +02:00
Nadji Abidi
190774258c
Add override_redirect for X11 windows
This commit add the `override_redirect` boolean field to the `PlatformSpecific` struct for linux platform.
This is a X11-specific flag allow bypassing window manager mapping for precise positioning of windows.
2024-09-11 00:00:40 +02:00
Héctor Ramón Jiménez
14e686cd37
Fix winit::conversion on Windows 2024-09-05 11:30:25 +02:00
Héctor Ramón
b5cbb4a4e4
Merge pull request #2284 from jquesada2016/mouse_passthrough
Add command for setting mouse passthrough
2024-09-05 11:22:03 +02:00
Night_Hunter
d1ceada119
add option for undecorated_shadow on windows (#2285)
* add option for undecorated_shadow on windows

* formated
2024-09-05 11:17:44 +02:00
Héctor Ramón Jiménez
64ec099a9b
Add mouse passthrough tasks to window module
Co-authored-by: Jose Quesada <jquesada2016@fau.edu>
2024-09-05 11:13:37 +02:00
Héctor Ramón Jiménez
9628dc20d5
Reconnect Clipboard on window close
Fixes #2564
2024-09-03 11:23:54 +02:00
Héctor Ramón Jiménez
0dcec519be
Add get_scale_factor task to window module 2024-08-30 13:02:49 +02:00
Andy Terra
6dc71f6f3b Expose additional mouse interaction cursors 2024-08-16 10:44:58 -04:00
Héctor Ramón Jiménez
9b99b932bc
Produce window::Event::Closed only if window exists 2024-08-15 02:11:17 +02:00
Héctor Ramón Jiménez
7c2abc9b8b
Fix crash when application boots from a URL event in macOS 2024-08-15 01:52:45 +02:00
Héctor Ramón Jiménez
8b45d620d0
Revert window::close producing a window::Id
Instead, subscribing to `window::close_events` is
preferable; since most use cases will want to react
to the user closing a window as well.
2024-08-12 05:50:22 +02:00
Héctor Ramón Jiménez
22fc5ce0ea
Produce window::Event::Closed on window::close 2024-08-12 05:20:44 +02:00
Héctor Ramón Jiménez
01aa84e41a
Make window::close return and introduce Task::discard 2024-08-12 05:12:42 +02:00
Héctor Ramón Jiménez
7decbb3d5d
Fix formatting in iced_winit::clipboard 2024-08-12 03:07:11 +02:00
Maja Kądziołka
f92e01e913
iced_winit: drop Clipboard before Window
Fixes #2482, avoids nasal daemons
2024-08-11 22:33:17 +02:00
Héctor Ramón Jiménez
169667ef1b
Plug received_url in winit::program 2024-08-01 19:25:02 +02:00
Héctor Ramón Jiménez
fd593f8fb0
Return window::Id in window::open 2024-07-30 22:26:55 +02:00
Héctor Ramón Jiménez
10f367a313
Avoid exiting when a window is being opened
Fixes #2532
2024-07-30 00:51:46 +02:00
Héctor Ramón Jiménez
a5b1a1df54
Fix macOS race condition when closing window 2024-07-24 12:18:53 +02:00
Héctor Ramón Jiménez
884c66ca15
Depend on wasm-bindgen-futures only for Wasm
Fixes #2518
2024-07-24 10:39:24 +02:00
Héctor Ramón Jiménez
2eea9b81e4
Exit runtime with control_sender instead of break 2024-07-24 10:34:24 +02:00
Héctor Ramón Jiménez
a108b2eebe
Add resize_events subscription to window module 2024-07-13 12:53:06 +02:00
Héctor Ramón Jiménez
1c1bee6fd8
Finish window::open only when window fully opens
... and run initial `Task` after `window::open` for
applications. This fixes certain race conditions.
2024-07-11 10:44:44 +02:00