You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation where I need the logical screen resolution before I launch an App.
I can get it by manually by creating an EventLoop and Window.
let r#loop = EventLoop::new();let window = Window::new(&r#loop).ok()?;let monitor = window.current_monitor()?;Some(monitor.size().to_logical(window.scale_factor()))
This works on Windows without any panics, but it breaks the Linux build.
The above logic causes the following panic, removing it causes the panic to go away ...
thread 'main' panicked at /home/~~~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.26.2/src/platform_impl/linux/event_loop.rs:187:52:
Failed to initialize gtk backend!: Error { domain: g-io-error-quark, code: 2, message: "An object is already exported for the interface org.gtk.Application at /org/gtk/Application/anonymous" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I understand the panic is a Tao issue, but I would like another way of getting the logic screen resolutions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have a situation where I need the logical screen resolution before I launch an App.
I can get it by manually by creating an
EventLoop
andWindow
.This works on Windows without any panics, but it breaks the Linux build.
The above logic causes the following panic, removing it causes the panic to go away ...
I understand the panic is a Tao issue, but I would like another way of getting the logic screen resolutions.
Any suggestions?
Thanks,
Nejat
Beta Was this translation helpful? Give feedback.
All reactions