50 Commits

Author SHA1 Message Date
Robin Quint
bd3d59ce62 winit-support now uses event-io for everything 2022-12-22 15:04:58 +01:00
Robin
2d9efba59b Added full keymap to winit backend, fixed keyboard example 2022-12-21 20:18:16 +01:00
Robin Quint
e51af80da7 upgraded imgui to 1.89.1, changed winit-support to use new event io 2022-12-21 15:14:31 +01:00
Lena Milizé
b377181c54 re-export winit and glow
Signed-off-by: Lena Milizé <me@lvmn.org>
2022-10-27 10:03:36 +02:00
dbr
c032408329 sudo rm -rf old-winit
Somewhat experimental removal of old winit versions, to reduce maintenance burden

Significantly reduces (around half) the length of winit-support, should reduce amount of work done in CI
2022-04-30 10:12:56 -04:00
dbr/Ben
fef6509a6e
Merge pull request #628 from dbr/losingfocus
Handle window focus lost event
2022-03-23 12:12:56 +10:30
dbr
5cd71fef4c cargo fmt --all 2022-03-19 21:10:22 +11:00
dbr
9648b40d85 Handle window focus lost event
Avoids keys getting stuck when window loses focus (e.g alt+tab)

Closes #602
2022-03-19 21:04:16 +11:00
Marijn Suijten
db71313f04 imgui-winit-support: Get DrawData from Context instead of Ui
As per a recent deprecation change scheduled for the 0.9 release.
2022-03-15 14:03:11 +01:00
Marijn Suijten
055c16b4e2 imgui-winit-support: Fix use of update_delta_time in example doc 2022-03-15 13:51:35 +01:00
Marijn Suijten
b08f3bfe29 imgui-winit-support: Compile doctest on winit 20+ 2022-03-15 13:51:28 +01:00
Jack Mac
fadcd35c0a grumble 2022-02-21 18:55:39 -05:00
Jack Mac
8dea2edcfa init. copying other work 2022-02-21 18:55:39 -05:00
Philippe Renon
169403c526 winit-support: fix dpi handling in attach_window() when not in default mode
attach_window() was using the imgui scale factor when converting
winit physical size to logical size instead of the winit scale factor.

This would cause the imgui display size to be incorrect when not using the
HiDpiMode::Default mode (in default mode the imgui and winit scale factors
are the same and the issue goes unnoticed).

Note that handle_window_event() has similar (and correct) logic when handling WindowEvent::Resized events.
This also explain why the issue went mostly undiscovered as winit tends to
generate quite a bunch of resize events that would hide the miscalculation
done in attach_window().

A similar issue was also fixed in the WindowEvent::ScaleFactorChanged handling code.

should fix https://github.com/imgui-rs/imgui-rs/issues/441
2022-02-21 17:16:34 -05:00
Connor Fitzgerald
c8b1647255 Support winit-0.26 2021-12-21 21:10:35 -05:00
Jack Mac
694cd96d49 getting close! input_text resize is broken,
and i'll need to check the imgui docs example with std::string
to get a reference to how to do it properly.
2021-09-13 17:12:00 -04:00
Jack Spira
a57227d4cb fmt 2021-09-05 23:32:54 -07:00
Jack Spira
ea356177eb broke winit 19, fixed 2021-09-05 23:16:27 -07:00
Jack Spira
6570f0bf40 okay fixed our winit hell situation 2021-09-05 14:30:47 -07:00
Johan Andersson
79f9345362
Add support & upgrade to winit 0.25 (#485) 2021-05-22 17:19:02 -07:00
Thom Chiovoloni
81e21f5853 Whoops, missed a spot 2020-12-31 19:32:44 -08:00
Thom Chiovoloni
64a8d3260d Attempt to bludgeon the winit/glium/gfx versions into submission 2020-12-31 19:32:44 -08:00
Thom Chiovoloni
65bfc1469e Use compare_exchange and not compare_and_swap 2020-12-31 13:06:04 -08:00
noxabellus
eada611c2c Fix for default cursor on linux with winit-support
* Changes `to_winit_cursor` to give MouseCursor::Default for Arrow
2020-12-19 17:06:18 -08:00
Willem Verstraeten
7e2293bde6 support winit-0.24 2020-12-15 20:47:54 -08:00
Thom Chiovoloni
e585291e4d fix lint errors and ensure examples actually are linted 2020-12-05 23:32:54 -08:00
Thom Chiovoloni
535b073871 Avoid dropping mouse events where press/release is on the same frame in imgui-winit-support 2020-12-05 23:32:54 -08:00
Thom Chiovoloni
54ab45b15c Support multiple simultaneous winit versions in imgui-winit-support
- Resolve conflicts in favor of latest.
- Warn at runtime if more than one is enabled and its a debug build (but
  support turning that off via yet another feature)
- Document all of this, including examples and (rough) support policy.
2020-12-05 23:32:54 -08:00
JMS55
a6ba02aa36 Initial winit 0.23 support 2020-10-01 22:37:15 -04:00
Joonas Javanainen
2edfb4bf85
Reduce unnecessary winit cursor changes 2020-07-07 23:39:07 +03:00
Gabriel Smith
59c67e78f4 Run cargo fmt on winit 0.22 changes 2020-05-18 15:12:38 -04:00
Walter Pearce
02545f9c38 Add support for winit 0.22 with feature flag in imgui-winit-support. Fix some clippy warnings. 2020-05-18 15:12:38 -04:00
Jonathan Spira
2f57a3099a Updated winit to use new modifier framework in imgui 2020-02-17 10:09:43 -08:00
Joonas Javanainen
6e246b0c7c
Fix most Clippy warnings 2020-02-15 12:58:25 +02:00
Joonas Javanainen
b759a44c84
Upgrade to imgui/cimgui 1.75 2020-02-15 12:39:27 +02:00
Joonas Javanainen
1e1b17b874
Make winit 0.20+ the default 2020-02-15 12:18:11 +02:00
Aaron Loucks
9a59b17ea0 Update winit to 0.20.0 2020-01-11 01:48:31 -05:00
Joonas Javanainen
dd561e3402
Apply backspace fix to winit-20 as well 2019-09-08 12:08:42 +03:00
Joonas Javanainen
744e8f40b6
Merge pull request #253 from aclysma/fix-backspace-text-entry
Fix backspace text entry
2019-09-08 12:01:15 +03:00
Joonas Javanainen
9fcfad0db7
Add virtual key code for KeyPadEnter 2019-09-07 16:42:32 +03:00
Philip Degarmo
5903391fa5 Fix a compile warning
"warning: `...` range patterns are deprecated" (ellipsis_inclusive_range_patterns)
2019-08-27 21:59:47 -07:00
Philip Degarmo
fda30fd528 Fix backspace for text entry fields.
The original problem was that hitting backspace would insert 0x7f, and then delete it. This prevented deleting the intended character.
2019-08-27 21:54:10 -07:00
Aaron Loucks
2d93462501 Update travis to build imgui-winit-support with multiple feature sets
Disable doc tests in imgui-winit-support until only a single
version of winit is supported again.
2019-06-30 15:08:09 -04:00
Aaron Loucks
938f85cb72 Add support for winit 0.20-alpha via feature toggle 2019-06-30 14:44:38 -04:00
Joonas Javanainen
9e3cd1681c
Renderers accept DrawData directly
There's no need to pass Ui, which makes this alternative much more
flexible.
2019-06-29 13:30:13 +03:00
Joonas Javanainen
721bf46746
Pull input+winit stuff from 0.1-dev 2019-06-27 22:12:35 +03:00
Joonas Javanainen
9516e622be
Pull first part of 0.1 context API 2019-06-27 18:18:57 +03:00
Joonas Javanainen
91a961e06a
Use more 2018 edition idioms 2018-12-31 12:16:28 +02:00
Joonas Javanainen
20139851e2
Upgrade to Rust 2018 edition
We might as well do this since we've been forced to 1.31...
2018-12-31 11:51:34 +02:00
Joonas Javanainen
eb5aaf1c2a
Replace imgui-glutin-support with imgui-winit-support 2018-12-16 12:02:42 +02:00