Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #12

Merged
merged 83 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
e6af484
Attempt to provide more info to @NatsuShio
richard-uk1 Nov 24, 2020
0fa9bdb
Fix clipbox bug.
richard-uk1 Dec 7, 2020
535ee5e
I should start adding to the changelog :).
richard-uk1 Dec 7, 2020
6f3c076
Merge pull request #1448 from derekdreery/clipbox_has_active
richard-uk1 Dec 7, 2020
65eb306
Cursor setting fixups
cmyr Dec 11, 2020
aa5d0f8
Update Cargo.toml
richard-uk1 Dec 13, 2020
de9eb90
Update Cargo.toml
richard-uk1 Dec 13, 2020
a77c8d7
Rework identity (again) (#1435)
JAicewizard Dec 13, 2020
0403b93
[GTK] Support more file dialog customization. (#1456)
jneem Dec 13, 2020
3dbbe68
Name change.
richard-uk1 Dec 14, 2020
166c78b
Merge pull request #1460 from linebender/derekdreery-patch-1
richard-uk1 Dec 14, 2020
900a0ce
Add documentation to layout example (#1450)
JAicewizard Dec 14, 2020
348a4ce
Merge pull request #1429 from derekdreery/log_win_rt_result
richard-uk1 Dec 14, 2020
9e44fa7
Allow for custom save/open commands. (#1463)
jneem Dec 15, 2020
5e2f821
2nd column should be built with "with_flex_child" too
gergohuszar Dec 15, 2020
f4b98bd
Respect starting directory for dialogs on Windows (#1452)
MaximilianKoestler Dec 16, 2020
f0910af
Manually track click count
cmyr Dec 14, 2020
7f7535a
Use same codepath for dialog response as other events
cmyr Dec 20, 2020
d6b93fa
Add serde feature, and enable `im/serde` when active.
richard-uk1 Dec 20, 2020
45b668f
Retain `Send` and `Sync` from type-erasing `image::Error`.
richard-uk1 Dec 21, 2020
963876c
Merge pull request #1481 from derekdreery/image_error_send_sync
richard-uk1 Dec 21, 2020
ab882ef
Add `Sync + Send` bounds to `dyn Error` from image.
richard-uk1 Dec 21, 2020
0e1e47b
Merge pull request #1482 from derekdreery/image_error_sync_send
richard-uk1 Dec 21, 2020
dca4bee
Fix builtin command name collision
cmyr Dec 21, 2020
c80157b
Merge pull request #1477 from derekdreery/serde_feature
richard-uk1 Dec 22, 2020
7e35a76
Update to piet 0.3.0
cmyr Dec 23, 2020
6d9740c
[GTK] support default_name in file dialogs (#1486)
jneem Dec 25, 2020
1ce9d5c
Share ClickCounter type between web & gtk
cmyr Dec 16, 2020
3637bf7
Remove ImageBuf from druid-shell (#1434)
jneem Dec 28, 2020
b217dd8
Update piet to v0.3.1
cmyr Dec 28, 2020
990c682
Add Formatter trait for validating & formatting text
cmyr Nov 6, 2020
4f32851
Rename parse example -> value-formatting, and make it a package.
cmyr Nov 24, 2020
5ef2a27
Cleanup formatter work
cmyr Nov 25, 2020
1e6cd6f
Allow custom format functions with ParseFormatter
cmyr Dec 29, 2020
6bb0f51
Add changelog entry
cmyr Dec 30, 2020
cd2a022
Allow the user to specify a subrectangle of an image to display.
richard-uk1 Dec 13, 2020
8a01405
Improve svg support.
richard-uk1 Dec 13, 2020
22f31ab
Add png image to dialog FileSpecs
richard-uk1 Dec 14, 2020
9b98428
Fix test error.
richard-uk1 Dec 31, 2020
123a177
Bump piet version
richard-uk1 Dec 31, 2020
f8fe8bc
Fix some more clippy
richard-uk1 Dec 31, 2020
e9f1430
Merge pull request #1461 from derekdreery/image_clip_and_share
richard-uk1 Dec 31, 2020
cc2f867
fix typo
kud1ing Jan 1, 2021
0378e93
Add Data to widget::prelude
cmyr Jan 1, 2021
ed4f9ef
Prepare for 0.7.0
cmyr Dec 31, 2020
253ff7f
Add MouseButtons.count()
jjl Jan 3, 2021
a4825af
Update README to point to v0.7
richard-uk1 Jan 4, 2021
41cbf1f
MouseButtons.count takes an immutable ref
jjl Jan 4, 2021
b949b61
Merge pull request #1501 from linebender/derekdreery-patch-1
richard-uk1 Jan 4, 2021
e7f8085
[ci] Use mdbook 0.4.5 when building docs
cmyr Jan 4, 2021
6b77e8e
Update version in various docs
cmyr Jan 4, 2021
2aa6b82
appease clippy
jjl Jan 5, 2021
69a8bcf
Merge pull request #1500 from jjl/feature/buttons-count
richard-uk1 Jan 5, 2021
9616294
Fix for Issue 1491 : typo in scroll_component.rs
tirix Jan 5, 2021
deeed08
Account for viewport_offset in children's LayoutCtx::mouse_pos
jpochyla Dec 20, 2020
4d34d78
Change conditional use of svg to be on the feature svg instead of pla…
rjwittams Jan 5, 2021
5991055
Merge pull request #1508 from rjwittams/web-svg-cond
richard-uk1 Jan 5, 2021
05962bf
Scroll updates to support enabling particular bars and programmatical…
rjwittams Jan 6, 2021
da439a7
Paint tab close buttons to avoid font reliance. (#1510)
rjwittams Jan 6, 2021
7749db7
Remove uses of atomic compare_and_swap operation
cmyr Jan 4, 2021
eb956e9
Fix some nightly clippy lints
cmyr Jan 4, 2021
97716a1
implementing data trait for ImageBuf
arthmis Jan 6, 2021
2ff6318
Sub windows (#1254)
rjwittams Jan 7, 2021
5f3d9db
Add simple markdown editor example (#1513)
cmyr Jan 7, 2021
497be22
Add widget wrapper and implementation macros. (#1511)
rjwittams Jan 7, 2021
78e1570
adding added controller widget (#1485)
arthmis Jan 8, 2021
d7a1e39
Make 'set_level' available from WindowDesc (#1515)
Schaback Jan 8, 2021
75d5096
Add Env::try_set_raw
cmyr Jan 8, 2021
28fc87d
Update to x11rb 0.7.0
psychon Jan 9, 2021
9801063
Update to x11rb 0.8.0
psychon Jan 9, 2021
0b8ec29
Update CHANGELOG
psychon Jan 9, 2021
90cd9ee
Please rustfmt
psychon Jan 9, 2021
d4fc071
Please clippy
psychon Jan 9, 2021
652058d
Merge pull request #1519 from psychon/x11rb-update
maan2003 Jan 10, 2021
a18e3fa
typo in doc
edwin0cheng Jan 10, 2021
7545dc7
Merge pull request #1524 from edwin0cheng/typo
edwin0cheng Jan 10, 2021
fb434a1
Fix docs of derived Lens
maan2003 Jan 10, 2021
d8041c2
Add RichTextBuilder (#1520)
maan2003 Jan 10, 2021
6a28e7f
Provide get_external_handle on DelegateCtx
maan2003 Jan 11, 2021
8b37b44
Update Changelog
maan2003 Jan 11, 2021
5fbbeb4
Merge pull request #1526 from Maan2003/delegatectx-get-external-handle
maan2003 Jan 11, 2021
689f0c4
Add Key::raw
cmyr Jan 11, 2021
291b121
Allow additional l10n resource in AppLauncher (#1528)
edwin0cheng Jan 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.5'
mdbook-version: '0.4.5'

- run: mdbook build docs

Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Andrey Kabylin
Garrett Risley
Robert Wittams
Jaap Aarts
Maximilian Köstler
58 changes: 55 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,49 @@
# Changelog

The latest published Druid release is [0.6.0](#060---2020-06-01) which was released on 2020-06-01.
You can find its changes [documented below](#060---2020-06-01).
The latest published Druid release is [0.7.0](#070---2021-01-01) which was released on 2021-01-01.
You can find its changes [documented below](#070---2021-01-01).

## [Unreleased]
# Unreleased

### Highlights

### Added
- Sub windows: Allow opening windows that share state with arbitrary parts of the widget hierarchy ([#1254] by [@rjwittams])
- WindowCloseRequested/WindowDisconnected event when a window is closing ([#1254] by [@rjwittams])
- RichTextBuilder ([#1520] by [@Maan2003])
- `get_external_handle` on `DelegateCtx` ([#1526] by [@Maan2003])
- `AppLauncher::localization_resources` to use custom l10n resources. ([#1528] by [@edwin0cheng])

### Changed

### Deprecated

### Removed

### Fixed

- Fixed docs of derived Lens ([#1523] by [@Maan2003])

### Visual

### Docs

### Examples

### Maintenance

- Updated to x11rb 0.8.0. ([#1519] by [@psychon])

### Outside News

## [0.7.0] - 2021-01-01

### Highlights

- Text improvements: `TextLayout` type ([#1182]) and rich text support ([#1245])
- The `Formatter` trait provides more flexible handling of converions between
values and their textual representations. ([#1377])

### Added

- Windows: Added Screen module to get information about monitors and the screen. ([#1037] by [@rhzk])
Expand Down Expand Up @@ -56,6 +93,9 @@ You can find its changes [documented below](#060---2020-06-01).
- `WidgetPod::is_initialized` to check if a widget has received `WidgetAdded`. ([#1259] by [@finnerale])
- `TextBox::with_text_alignment` and `TextBox::set_text_alignment` ([#1371] by [@cmyr])
- Add default minimum size to `WindowConfig`. ([#1438] by [@colinfruit])
- Open and save dialogs send configurable commands. ([#1463] by [@jneem])
- Windows: Dialogs now respect the parameter passed to `force_starting_directory()` ([#1452] by [@MaximilianKoestler])
- Value formatting with the `Formatter` trait ([#1377] by [@cmyr])

### Changed

Expand Down Expand Up @@ -83,8 +123,10 @@ You can find its changes [documented below](#060---2020-06-01).
- `TextBox` selects all contents when tabbed to on macOS ([#1283] by [@cmyr])
- All Image formats are now optional, reducing compile time and binary size by default ([#1340] by [@JAicewizard])
- The `Cursor` API has changed to a stateful one ([#1433] by [@jneem])
- Part of the `SAVE_FILE` command is now `SAVE_FILE_AS` ([#1463] by [@jneem])

### Deprecated
- Parse widget (replaced with `Formatter` trait) ([#1377] by [@cmyr])

### Removed

Expand All @@ -93,6 +135,7 @@ You can find its changes [documented below](#060---2020-06-01).

### Fixed

- `ClipBox` should forward events if any child is active, not just the immediate child. ([#1448] by [@derekdreery])
- macOS: Timers not firing during modal loop. ([#1028] by [@xStrom])
- GTK: Directory selection now properly ignores file filters. ([#957] by [@xStrom])
- GTK: Don't crash when receiving an external command while a file dialog is visible. ([#1043] by [@jneem])
Expand Down Expand Up @@ -126,6 +169,7 @@ You can find its changes [documented below](#060---2020-06-01).
- Ensure that `LifeCycle::WidgetAdded` is the first thing a widget sees. ([#1259] by [@finnerale])
- Fix a missed call to `CloseClipboard` on Windows. ([#1410] by [@andrewhickman])
- WidgetPod: change not laid out `debug_panic` to warning ([#1441] by [@Maan2003])

### Visual

- `TextBox` stroke remains inside its `paint_rect`. ([#1007] by [@jneem])
Expand Down Expand Up @@ -359,6 +403,8 @@ Last release without a changelog :(
[@andrewhickman]: https://github.com/andrewhickman
[@colinfruit]: https://github.com/colinfruit
[@Maan2003]: https://github.com/Maan2003
[@derekdreery]: https://github.com/derekdreery
[@MaximilianKoestler]: https://github.com/MaximilianKoestler

[#599]: https://github.com/linebender/druid/pull/599
[#611]: https://github.com/linebender/druid/pull/611
Expand Down Expand Up @@ -546,6 +592,12 @@ Last release without a changelog :(
[#1433]: https://github.com/linebender/druid/pull/1433
[#1438]: https://github.com/linebender/druid/pull/1438
[#1441]: https://github.com/linebender/druid/pull/1441
[#1448]: https://github.com/linebender/druid/pull/1448
[#1463]: https://github.com/linebender/druid/pull/1463
[#1452]: https://github.com/linebender/druid/pull/1452
[#1520]: https://github.com/linebender/druid/pull/1520
[#1523]: https://github.com/linebender/druid/pull/1523
[#1526]: https://github.com/linebender/druid/pull/1523

[Unreleased]: https://github.com/linebender/druid/compare/v0.6.0...master
[0.6.0]: https://github.com/linebender/druid/compare/v0.5.0...v0.6.0
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ members = [
"docs/book_examples",
"druid/examples/web",
"druid/examples/hello_web",
"druid/examples/value_formatting",
]
default-members = [
"druid",
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ a lone dependency (it re-exports all the parts of `druid-shell`, `piet`, and `ku
that you'll need):

```toml
druid = "0.6.0"
druid = "0.7.0"
```

Since Druid is currently in fast-evolving state, you might prefer to drink from
Expand Down Expand Up @@ -301,14 +301,14 @@ active and friendly community.
[Zulip chat instance]: https://xi.zulipchat.com
[non-`druid` examples]: ./druid-shell/examples/shello.rs
[crates.io]: https://crates.io/crates/druid
[EventCtx]: https://docs.rs/druid/0.6.0/druid/struct.EventCtx.html
[LifeCycleCtx]: https://docs.rs/druid/0.6.0/druid/struct.LifeCycleCtx.html
[LayoutCtx]: https://docs.rs/druid/0.6.0/druid/struct.LayoutCtx.html
[PaintCtx]: https://docs.rs/druid/0.6.0/druid/struct.PaintCtx.html
[UpdateCtx]: https://docs.rs/druid/0.6.0/druid/struct.UpdateCtx.html
[Widget trait]: https://docs.rs/druid/0.6.0/druid/trait.Widget.html
[Data trait]: https://docs.rs/druid/0.6.0/druid/trait.Data.html
[Lens datatype]: https://docs.rs/druid/0.6.0/druid/trait.Lens.html
[EventCtx]: https://docs.rs/druid/0.7.0/druid/struct.EventCtx.html
[LifeCycleCtx]: https://docs.rs/druid/0.7.0/druid/struct.LifeCycleCtx.html
[LayoutCtx]: https://docs.rs/druid/0.7.0/druid/struct.LayoutCtx.html
[PaintCtx]: https://docs.rs/druid/0.7.0/druid/struct.PaintCtx.html
[UpdateCtx]: https://docs.rs/druid/0.7.0/druid/struct.UpdateCtx.html
[Widget trait]: https://docs.rs/druid/0.7.0/druid/trait.Widget.html
[Data trait]: https://docs.rs/druid/0.7.0/druid/trait.Data.html
[Lens datatype]: https://docs.rs/druid/0.7.0/druid/trait.Lens.html
[Druid book]: https://linebender.org/druid/
[Iced]: https://github.com/hecrj/iced
[Conrod]: https://github.com/PistonDevelopers/conrod
Expand Down
12 changes: 6 additions & 6 deletions docs/src/custom_widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ v controller, painter
- request paint & request layout
- changing widgets at runtime

[`Controller`]: https://docs.rs/druid/0.6.0/druid/widget/trait.Controller.html
[`Controller`]: https://docs.rs/druid/0.7.0/druid/widget/trait.Controller.html
[`Widget`]: ./widget.md
[`Painter`]: https://docs.rs/druid/0.6.0/druid/widget/struct.Painter.html
[`SizedBox`]: https://docs.rs/druid/0.6.0/druid/widget/struct.SizedBox.html
[`Container`]: https://docs.rs/druid/0.6.0/druid/widget/struct.Container.html
[`WidgetExt`]: https://docs.rs/druid/0.6.0/druid/trait.WidgetExt.html
[`background`]: https://docs.rs/druid/0.6.0/druid/trait.WidgetExt.html#background
[`Painter`]: https://docs.rs/druid/0.7.0/druid/widget/struct.Painter.html
[`SizedBox`]: https://docs.rs/druid/0.7.0/druid/widget/struct.SizedBox.html
[`Container`]: https://docs.rs/druid/0.7.0/druid/widget/struct.Container.html
[`WidgetExt`]: https://docs.rs/druid/0.7.0/druid/trait.WidgetExt.html
[`background`]: https://docs.rs/druid/0.7.0/druid/trait.WidgetExt.html#background
20 changes: 10 additions & 10 deletions docs/src/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ In general, you should not need to worry about localization directly. See the
[localization] chapter for an overview of localization in Druid.


[`Env`]: https://docs.rs/druid/0.6.0/druid/struct.Env.html
[`Key`]: https://docs.rs/druid/0.6.0/druid/struct.Key.html
[`Value`]: https://docs.rs/druid/0.6.0/druid/struct.Value.html
[`LocalizedString`]: https://docs.rs/druid/0.6.0/druid/struct.LocalizedString.html
[`resolve`]: https://docs.rs/druid/0.6.0/druid/struct.LocalizedString.html#method.resolve
[`Env`]: https://docs.rs/druid/0.7.0/druid/struct.Env.html
[`Key`]: https://docs.rs/druid/0.7.0/druid/struct.Key.html
[`Value`]: https://docs.rs/druid/0.7.0/druid/struct.Value.html
[`LocalizedString`]: https://docs.rs/druid/0.7.0/druid/struct.LocalizedString.html
[`resolve`]: https://docs.rs/druid/0.7.0/druid/struct.LocalizedString.html#method.resolve
[localization]: ./localization.md
[reverse-DNS]: https://en.wikipedia.org/wiki/Reverse_domain_name_notation
[`AppLauncher::configure_env`]: https://docs.rs/druid/0.6.0/druid/struct.AppLauncher.html#method.configure_env
[`KeyOrValue`]: https://docs.rs/druid/0.6.0/druid/enum.KeyOrValue.html
[`EnvScope`]: https://docs.rs/druid/0.6.0/druid/widget/struct.EnvScope.html
[`WidgetExt`]: https://docs.rs/druid/0.6.0/druid/trait.WidgetExt.html
[`env_scope`]: https://docs.rs/druid/0.6.0/druid/trait.WidgetExt.html#method.env_scope
[`AppLauncher::configure_env`]: https://docs.rs/druid/0.7.0/druid/struct.AppLauncher.html#method.configure_env
[`KeyOrValue`]: https://docs.rs/druid/0.7.0/druid/enum.KeyOrValue.html
[`EnvScope`]: https://docs.rs/druid/0.7.0/druid/widget/struct.EnvScope.html
[`WidgetExt`]: https://docs.rs/druid/0.7.0/druid/trait.WidgetExt.html
[`env_scope`]: https://docs.rs/druid/0.7.0/druid/trait.WidgetExt.html#method.env_scope
4 changes: 2 additions & 2 deletions docs/src/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Setting up a project is a simple as creating a new Rust project;
And then adding Druid as a dependency to Cargo.toml
```toml
[dependencies]
druid = "0.6.0"
druid = "0.7.0"
```

To show a minimal window with a label replace `main.rs` with this;
Expand Down Expand Up @@ -70,7 +70,7 @@ fn build_ui() -> impl Widget<()> {
.with_flex_child(Label::new("top left"), 1.0)
.with_flex_child(Align::centered(Label::new("bottom left")), 1.0),
1.0)
.with_child(
.with_flex_child(
Flex::column()
.with_flex_child(Label::new("top right"), 1.0)
.with_flex_child(Align::centered(Label::new("bottom right")), 1.0),
Expand Down
2 changes: 1 addition & 1 deletion docs/src/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cargo new my-application
and adding the druid dependency to your Cargo.toml
```no_compile
[dependencies]
druid = "0.6.0"
druid = "0.7.0"
// or to be on the bleeding edge:
druid = { git = "https://github.com/linebender/druid.git" }
```
Expand Down
4 changes: 2 additions & 2 deletions druid-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "druid-derive"
version = "0.3.1"
version = "0.4.0"
license = "Apache-2.0"
authors = ["Druid authors"]
description = "derive impls for druid, a Rust UI toolkit."
Expand All @@ -20,6 +20,6 @@ quote = "1.0.7"
proc-macro2 = "1.0.19"

[dev-dependencies]
druid = { version = "0.6.0", path = "../druid" }
druid = { version = "0.7.0", path = "../druid" }

float-cmp = { version = "0.8.0", features = ["std"], default-features = false }
7 changes: 5 additions & 2 deletions druid-derive/src/lens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ fn derive_struct(input: &syn::DeriveInput) -> Result<proc_macro2::TokenStream, s
// Define lens types for each field
let defs = fields.iter().filter(|f| !f.attrs.ignore).map(|f| {
let field_name = &f.ident.unwrap_named();

let docs = format!(
"Lens for the field `{}` on [`{1}`](super::{1})",
field_name, ty
);
quote! {
/// Lens for the field on #ty
#[doc = #docs]
#[allow(non_camel_case_types)]
#[derive(Debug, Copy, Clone)]
pub struct #field_name;
Expand Down
17 changes: 9 additions & 8 deletions druid-shell/Cargo.toml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "druid-shell"
version = "0.6.0"
version = "0.7.0"
license = "Apache-2.0"
authors = ["Raph Levien <[email protected]>"]
description = "Platform abstracting application shell used for druid toolkit."
Expand Down Expand Up @@ -38,13 +38,13 @@ hdr = ["piet-common/hdr"]
[dependencies]
# NOTE: When changing the piet or kurbo versions, ensure that
# the kurbo version included in piet is compatible with the kurbo version specified here.
piet-common = "=0.2.0-pre6"
kurbo = "0.7.0"
piet-common = "=0.3.2"
kurbo = "0.7.1"

log = "0.4.11"
lazy_static = "1.4.0"
time = "0.2.16"
cfg-if = "0.1.10"
cfg-if = "1.0.0"
instant = { version = "0.1.6", features = ["wasm-bindgen"] }
anyhow = "1.0.32"
keyboard-types = { version = "0.5.0", default_features = false }
Expand All @@ -60,11 +60,12 @@ wio = "0.2.2"
version = "0.3.9"
features = ["d2d1_1", "dwrite", "winbase", "libloaderapi", "errhandlingapi", "winuser",
"shellscalingapi", "shobjidl", "combaseapi", "synchapi", "dxgi1_3", "dcomp",
"d3d11", "dwmapi", "wincon", "fileapi", "processenv", "winbase", "handleapi"]
"d3d11", "dwmapi", "wincon", "fileapi", "processenv", "winbase", "handleapi",
"shellapi"]

[target.'cfg(target_os="macos")'.dependencies]
block = "0.1.6"
cocoa = "0.23.0"
cocoa = "0.24.0"
objc = "0.2.7"
core-graphics = "0.22.0"
foreign-types = "0.3.2"
Expand All @@ -84,7 +85,7 @@ glib = { version = "0.10.1", optional = true }
glib-sys = { version = "0.10.0", optional = true }
gtk-sys = { version = "0.10.0", optional = true }
nix = { version = "0.18.0", optional = true }
x11rb = { version = "0.6.0", features = ["allow-unsafe-code", "present", "randr", "xfixes"], optional = true }
x11rb = { version = "0.8.0", features = ["allow-unsafe-code", "present", "randr", "xfixes"], optional = true }

[target.'cfg(target_arch="wasm32")'.dependencies]
wasm-bindgen = "0.2.67"
Expand All @@ -95,6 +96,6 @@ version = "0.3.44"
features = ["Window", "MouseEvent", "CssStyleDeclaration", "WheelEvent", "KeyEvent", "KeyboardEvent"]

[dev-dependencies]
piet-common = { version = "=0.2.0-pre6", features = ["png"] }
piet-common = { version = "=0.3.2", features = ["png"] }
simple_logger = { version = "1.9.0", default-features = false }
static_assertions = "1.1.0"
6 changes: 3 additions & 3 deletions druid-shell/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ impl Application {
///
/// [druid#771]: https://github.com/linebender/druid/issues/771
pub fn new() -> Result<Application, Error> {
if APPLICATION_CREATED.compare_and_swap(false, true, Ordering::AcqRel) {
return Err(Error::ApplicationAlreadyExists);
}
APPLICATION_CREATED
.compare_exchange(false, true, Ordering::AcqRel, Ordering::Acquire)
.map_err(|_| Error::ApplicationAlreadyExists)?;
util::claim_main_thread();
let platform_app = platform::Application::new()?;
let state = Rc::new(RefCell::new(State { running: false }));
Expand Down
Loading