Desktop: Support cursor icon change (#3223)

* browser console message forwarding

* replace target to make it easy to identify browser console messages

* use warn as per review comment

* cursor icon change

* fix win build
This commit is contained in:
Timon
2025-09-25 11:23:19 +00:00
committed by GitHub
parent b4be616de0
commit 04a2452333
5 changed files with 94 additions and 12 deletions
+5
View File
@@ -44,6 +44,7 @@ pub(crate) trait CefEventHandler: Clone + Send + Sync + 'static {
#[cfg(feature = "accelerated_paint")]
fn draw_gpu(&self, shared_texture: SharedTextureHandle);
fn load_resource(&self, path: PathBuf) -> Option<Resource>;
fn cursor_change(&self, cursor: winit::cursor::Cursor);
/// Schedule the main event loop to run the CEF event loop after the timeout.
/// See [`_cef_browser_process_handler_t::on_schedule_message_pump_work`] for more documentation.
fn schedule_cef_message_loop_work(&self, scheduled_time: Instant);
@@ -224,6 +225,10 @@ impl CefEventHandler for CefHandler {
None
}
fn cursor_change(&self, cursor: winit::cursor::Cursor) {
self.app_event_scheduler.schedule(AppEvent::CursorChange(cursor));
}
fn schedule_cef_message_loop_work(&self, scheduled_time: std::time::Instant) {
self.app_event_scheduler.schedule(AppEvent::ScheduleBrowserWork(scheduled_time));
}