@bobfrankston/msger 0.1.113 → 0.1.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
Binary file
@@ -587,16 +587,14 @@ fn main() {
587
587
  #[cfg(not(target_os = "linux"))]
588
588
  let webview = builder.build(window.as_ref()).expect("Failed to create webview");
589
589
 
590
- // Fix for garbled window on Linux/GTK: Force window resize after webview creation
590
+ // Fix for garbled window on Linux/GTK: Show window after webview creation
591
591
  // This ensures webkit2gtk renders properly on initial display
592
592
  #[cfg(target_os = "linux")]
593
593
  {
594
- let current_size = window.inner_size();
595
- window.set_inner_size(tao::dpi::PhysicalSize::new(
596
- current_size.width + 1,
597
- current_size.height + 1,
598
- ));
599
- window.set_inner_size(current_size);
594
+ // On Linux, hide and show the window to force a redraw
595
+ window.set_visible(false);
596
+ std::thread::sleep(std::time::Duration::from_millis(50));
597
+ window.set_visible(true);
600
598
  }
601
599
 
602
600
  webview
@@ -656,19 +654,14 @@ fn main() {
656
654
  #[cfg(not(target_os = "linux"))]
657
655
  let webview = builder.build(window.as_ref()).expect("Failed to create webview");
658
656
 
659
- // Fix for garbled window on Linux/GTK: Force window update after webview creation
657
+ // Fix for garbled window on Linux/GTK: Show window after webview creation
660
658
  // This ensures webkit2gtk renders properly on initial display
661
659
  #[cfg(target_os = "linux")]
662
660
  {
663
- // Use GTK directly to queue a redraw
664
- use gtk::prelude::*;
665
- if let Some(gtk_window) = vbox.toplevel().and_then(|w| w.downcast::<gtk::Window>().ok()) {
666
- gtk_window.queue_draw();
667
- // Also set and restore title to force window manager update
668
- let title = gtk_window.title().unwrap_or_default();
669
- gtk_window.set_title(&format!("{} ", title));
670
- gtk_window.set_title(&title);
671
- }
661
+ // On Linux, hide and show the window to force a redraw
662
+ window.set_visible(false);
663
+ std::thread::sleep(std::time::Duration::from_millis(50));
664
+ window.set_visible(true);
672
665
  }
673
666
 
674
667
  webview
@@ -788,18 +781,15 @@ fn main() {
788
781
  window_clone.set_fullscreen(Some(tao::window::Fullscreen::Borderless(monitor)));
789
782
  }
790
783
 
791
- // Fix for garbled window on Linux/GTK: Force window resize after fullscreen toggle
784
+ // Fix for garbled window on Linux/GTK: Force redraw after fullscreen toggle
792
785
  // This ensures webkit2gtk renders properly after state change
793
786
  #[cfg(target_os = "linux")]
794
787
  {
795
- // Small delay to let fullscreen state settle
788
+ // Small delay to let fullscreen state settle, then force redraw
796
789
  std::thread::sleep(std::time::Duration::from_millis(100));
797
- let current_size = window_clone.inner_size();
798
- window_clone.set_inner_size(tao::dpi::PhysicalSize::new(
799
- current_size.width + 1,
800
- current_size.height + 1,
801
- ));
802
- window_clone.set_inner_size(current_size);
790
+ window_clone.set_visible(false);
791
+ std::thread::sleep(std::time::Duration::from_millis(50));
792
+ window_clone.set_visible(true);
803
793
  }
804
794
  }
805
795
  // Escape exits fullscreen or dismisses window
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/msger",
3
- "version": "0.1.113",
3
+ "version": "0.1.115",
4
4
  "description": "Fast, lightweight, cross-platform message box - Rust-powered alternative to msgview",
5
5
  "type": "module",
6
6
  "main": "./index.js",