-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
(rustbasic) In Progress : Testing... #4182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very exciting if this indeed closes this many issues!
|
||
let viewport_id = egui_ctx.viewport_id(); | ||
// TODO : Do not recall until the next repaint. | ||
// 1000 millis / 60 fps = 16.67 millis | ||
self.egui_ctx | ||
.request_repaint_after_for(std::time::Duration::from_millis(8), viewport_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will just cause a hot repaint loop
let viewport_id = egui_ctx.viewport_id(); | |
// TODO : Do not recall until the next repaint. | |
// 1000 millis / 60 fps = 16.67 millis | |
self.egui_ctx | |
.request_repaint_after_for(std::time::Duration::from_millis(8), viewport_id); |
) | ||
} | ||
} else { | ||
let visuals = &ui.style().visuals.widgets.inactive; | ||
epaint::RectShape::stroke( | ||
frame_rect, | ||
visuals.rounding, | ||
visuals.bg_stroke, // TODO(emilk): we want to show something here, or a text-edit field doesn't "pop". | ||
ui.visuals().widgets.unhovered.bg_stroke, // TODO(emilk): we want to show something here, or a text-edit field doesn't "pop". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove unrelated commits
crates/egui-winit/src/lib.rs
Outdated
/* | ||
// Deprecated | ||
if cfg!(target_os = "windows") { | ||
// It's tempting to do this, but it leads to a deadlock on Mac when running | ||
// `cargo run -p custom_window_frame`. | ||
// See https://github.com/emilk/egui/issues/3494 | ||
viewport_info.maximized = Some(window.is_maximized()); | ||
viewport_info.minimized = Some(window.is_minimized().unwrap_or(false)); | ||
viewport_info.maximized = Some(window.is_maximized()); | ||
} | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove dead code
crates/egui-winit/src/lib.rs
Outdated
|
||
update_info.minimized = match cfg!(target_os = "windows") { | ||
true => Some(window.is_minimized().unwrap_or(false)), | ||
false => window.is_minimized(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the comment above says, this leads to deadlock on Mac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the comment above says, this leads to deadlock on Mac
Okay, I was curious about the results.
ViewportExit(WindowId), | ||
|
||
Exit(WindowId), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs docstrings
crates/eframe/src/native/run.rs
Outdated
@@ -227,6 +240,7 @@ fn run_and_return( | |||
}) | |||
.ok(); | |||
} | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code
this PR is too big |
In Progress : Testing...
Don't close, please.
Issues :
fullscreen
+transparent
+always_on_top
#4091eframe
on Windows high CPU usage due to excessive calls toglutin::context::make_not_current
#4173transparent
anddecoration
information. #4222Pull Requests :
Context::parent_viewport_id_of
#4217TextEdit
exists. #4242IME
event first #4509This will continue to be updated :
Based on
examples/test_viewports
andexamples/multiple_viewports
, all fixed to work properly.wgpu
only testedexamples/test_viewports
, so additional testing on your part is needed.