* Add an optional app_id field to eframe's NativeOptions (#1600).
This is used in the window builder to set the application ID, which is e.g. important for a proper configuration in `.desktop` files under Wayland.
When no application ID is explicitly set, it defaults to the title of the window.
* Only enable NativeOptions::app_id under Linux.
The wayland feature is not sufficent as constraint and it won't compile e.g. under Windows.
While Wayland could also be used on other Unix-Systems like FreeBSD, this would probably need some specific testing. Winit uses the following definition as "wayland_platform" and on which the required packages are available:
> wayland_platform: { all(feature = "wayland", free_unix, not(wasm), not(redox)) },
* Do not use title as default application ID under Wayland.
The title might be used to also communicate state (opened file, ...) to the user and this might have unforeseen consequences for the application ID. It seems to be better to use the old behavior of not setting an application ID in this case. Also add an example on how to set the application ID in the documentation.
* Avoid as_deref(), which was a left-over of a previous version
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
TextureId::Epaint was renamed to TextureId::Managed during the
development of #1110. Update the documentation to match.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* Update accesskit to 0.11
* Add instructions on how to test the web viewer to CONTRIBUTING.md
Also removed dependency on `jq`
Closes https://github.com/emilk/egui/issues/2859
* Detect panics during initialization and show them to the user
* PanicHandler now also logs the panics
* Add example of how to call into your app from JS
* Refactor: break out AppRunner and AppRunnerRef to own files
* Hide AppRunner
* Simplify user code
* AppRunnerRef -> WebRunner
* Better docs
* Don't paint until first animation frame
* Update multiple_apps.html
* Update web demo
* Cleanup and fixes
* left-align panic message in html
* Add Pointer::is_decidedly_dragging and could_any_button_be_click
This allows users to distinguish between click and drags
while they are not yet done.
* Fix warning in eframe
* fix typo
* Log warning instead of error when failing to decode RON in storage
* New web demo
* Clean up some warn/error logging
* Avoid deadlock that could happen on crash
* Log errors using console.warn, because console.error can cause crashes
* Use patched version of wasm-bindgen-cli, allowing >2GB memory
* New web demo
* Make wgpu webgl/gles opt-in (but still work out of the box via feature flag), workaround canvas creation issue
* missing allow unsafe code annotations
* add breaking change not to eframe release notes
* Add --webgpu flag to build_demo_web.sh
* Improve CHANGELOG docs
* Clean up, and prepare for having to wasm:s
* put canvas without workaround under `if false`
* fix spelling
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Refactor: remove extra store of events
* Remove unnecessary extra function
* Refactor: simplify event registering
* Store panic summary
* egui_demo_app: move web-part to own module
* index.html: await
* Properly unsubscribe from events on panic
* Better error handling
* Demo app html: hide the wasm canvas and show an error message on panic
* egui_demo_app: add panic button to test panic response on web
* fix typo
* Use a constructor to create WebHandle
* Refactor: less use of locks in the interfaces
* More consistent naming
* eframe: Set app icon on Mac and Windows
Also: correctly set window title on Mac when launching from
another process, e.g. python.
Co-authored-by: Wumpf <andreas@rerun.io>
* lint fixes
* Fix web build
* fix typo
* Try fix windows build
---------
Co-authored-by: Wumpf <andreas@rerun.io>
* Refactor repaint logic
* request_repaint_after also fires the request_repaint callback
* Bug fixes
* Add test to egui_demo_app
* build_demo_web: build debug unless --release is specified
* Fix the web backend too
* Run special clippy for wasm, forbidding some types/methods
* Remove wasm_bindgen_check.sh
* Fix typos
* Revert "Remove wasm_bindgen_check.sh"
This reverts commit 92dde25344.
* Only run cranky/clippy once
* add method for requesting attention to the main window
* use another enum member for user attention type instead of nested `Option`s
(also, document the enum members now that they don't mirror `winit`)
* update the docstring
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* add an example app for testing window attention requests
* Apply suggestions from code review
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* remove `chrono` dependency and improve the attention example's readability
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
It is very easy for keys to become stuck when we alt-tab,
or a save-dialog opens by Ctrl+S, etc.
Therefore we new clear all the modifiers and down keys to avoid that.
* Remove dark-light dependency
Since https://github.com/emilk/egui/pull/2750 we now get what we need
straight from `winit`.
* fix warning
* Docstring formatting
* fix typo in check.sh
* Replace tracing crate with log
It's just so much simpler to use
* Add `bacon wasm` job
* eframe: add a WebLogger for piping log events to the web console
* Set whether zooming allowed for x and y separately
* Set whether dragging allowed for x and y separately
* Add disclaimers about interaction with data_aspect
* Show zoom & drag behavior in plot demo/charts instead of context menu demo
* Code review suggestions - use AxisBools::any()
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Simplify allow_drag and allow_zoom APIs to take in Into<AxisBools>
* Remove unnecessary using...
* Remove unrelated change
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* improve plot groups and bounds handling
* changelog entry
* fix potential deadlock
* fix two more potential deadlocks
* syntax fix
* move changelog entry
* move category
* Update crates/egui/src/widgets/plot/mod.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update crates/egui_demo_lib/src/demo/plot_demo.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* clean up suggestions
* address comments
* use the new methods
* fix locked bounds
* Sync bounds_modified along with the bounds themselves
* move changelog entry
* Remove set_bounds_auto - not necessary any more
* add a comment about bounds modifications
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: Jackson Kruger <jackson@farprobe.com>