@bobfrankston/msger 0.1.117 → 0.1.119

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
@@ -368,6 +368,13 @@ fn main() {
368
368
  .with_resizable(true)
369
369
  .with_always_on_top(options.always_on_top);
370
370
 
371
+ // On Linux, create window invisible to avoid garbled rendering on webkit2gtk
372
+ // We'll show it after webview is created
373
+ #[cfg(target_os = "linux")]
374
+ {
375
+ window_builder = window_builder.with_visible(false);
376
+ }
377
+
371
378
  // Set icon if loaded successfully
372
379
  if let Some(icon) = icon {
373
380
  window_builder = window_builder.with_window_icon(Some(icon));
@@ -588,12 +595,11 @@ fn main() {
588
595
  let webview = builder.build(window.as_ref()).expect("Failed to create webview");
589
596
 
590
597
  // Fix for garbled window on Linux/GTK: Show window after webview creation
591
- // This ensures webkit2gtk renders properly on initial display
598
+ // Window was created invisible, now show it after webkit2gtk is ready
592
599
  #[cfg(target_os = "linux")]
593
600
  {
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));
601
+ // Give webkit2gtk time to initialize, then show the window
602
+ std::thread::sleep(std::time::Duration::from_millis(100));
597
603
  window.set_visible(true);
598
604
  }
599
605
 
@@ -655,12 +661,11 @@ fn main() {
655
661
  let webview = builder.build(window.as_ref()).expect("Failed to create webview");
656
662
 
657
663
  // Fix for garbled window on Linux/GTK: Show window after webview creation
658
- // This ensures webkit2gtk renders properly on initial display
664
+ // Window was created invisible, now show it after webkit2gtk is ready
659
665
  #[cfg(target_os = "linux")]
660
666
  {
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));
667
+ // Give webkit2gtk time to initialize, then show the window
668
+ std::thread::sleep(std::time::Duration::from_millis(100));
664
669
  window.set_visible(true);
665
670
  }
666
671
 
@@ -781,16 +786,7 @@ fn main() {
781
786
  window_clone.set_fullscreen(Some(tao::window::Fullscreen::Borderless(monitor)));
782
787
  }
783
788
 
784
- // Fix for garbled window on Linux/GTK: Force redraw after fullscreen toggle
785
- // This ensures webkit2gtk renders properly after state change
786
- #[cfg(target_os = "linux")]
787
- {
788
- // Small delay to let fullscreen state settle, then force redraw
789
- std::thread::sleep(std::time::Duration::from_millis(100));
790
- window_clone.set_visible(false);
791
- std::thread::sleep(std::time::Duration::from_millis(50));
792
- window_clone.set_visible(true);
793
- }
789
+ // On Linux, no additional handling needed since window starts clean
794
790
  }
795
791
  // Escape exits fullscreen or dismisses window
796
792
  KeyCode::Escape => {
Binary file
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "@bobfrankston/msger",
3
- "version": "0.1.117",
4
- "description": "Fast, lightweight, cross-platform message box - Rust-powered alternative to msgview",
5
- "type": "module",
6
- "main": "./index.js",
7
- "bin": {
8
- "msger": "cli.js"
9
- },
10
- "exports": {
11
- ".": {
12
- "import": "./index.js",
13
- "types": "./index.d.ts"
14
- }
15
- },
16
- "scripts": {
17
- "build": "npm run build:ts && npm run build:native",
18
- "build:native": "cd msger-native && npm run build",
19
- "build:native:wsl": "cd msger-native && npm run build:wsl",
20
- "build:native:arm64": "cd msger-native && npm run build:arm64",
21
- "build:native:pi": "cd msger-native && npm run build:pi",
22
- "build:native:all": "npm run build:native && npm run build:native:wsl && (npm run build:native:pi || true)",
23
- "setup:arm64": "wsl bash msger-native/setup-arm64-toolchain.sh",
24
- "build:ts": "tsc",
25
- "watch": "tsc -w",
26
- "clean": "rm -rf *.js *.d.ts *.js.map bin && cd msger-native && cargo clean",
27
- "test": "node test.js",
28
- "postinstall": "node postinstall.js",
29
- "prepublishOnly": "npm run build:ts && npm run build:native:all",
30
- "prerelease:local": "git add -A && (git diff-index --quiet HEAD || git commit -m \"Pre-release commit\")",
31
- "preversion": "npm run build:ts && npm run build:native:all && git add -A",
32
- "postversion": "git push && git push --tags",
33
- "release": "npm run prerelease:local && npm version patch && npm publish",
34
- "installer": "npm run release && npm cache clean --force && npm install -g @bobfrankston/msger@latest && wsl npm cache clean --force && wsl npm install -g @bobfrankston/msger@latest"
35
- },
36
- "keywords": [
37
- "message-box",
38
- "dialog",
39
- "webview",
40
- "rust",
41
- "native",
42
- "cross-platform",
43
- "typescript"
44
- ],
45
- "author": "Bob Frankston",
46
- "license": "ISC",
47
- "repository": {
48
- "type": "git",
49
- "url": "git+https://github.com/BobFrankston/msger.git"
50
- },
51
- "publishConfig": {
52
- "access": "public"
53
- },
54
- "devDependencies": {
55
- "@types/node": "^24.9.1"
56
- },
57
- "dependencies": {
58
- "ansi-to-html": "^0.7.2",
59
- "json5": "^2.2.3"
60
- }
61
- }
1
+ {
2
+ "name": "@bobfrankston/msger",
3
+ "version": "0.1.119",
4
+ "description": "Fast, lightweight, cross-platform message box - Rust-powered alternative to msgview",
5
+ "type": "module",
6
+ "main": "./index.js",
7
+ "bin": {
8
+ "msger": "cli.js"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "import": "./index.js",
13
+ "types": "./index.d.ts"
14
+ }
15
+ },
16
+ "scripts": {
17
+ "build": "npm run build:ts && npm run build:native",
18
+ "build:native": "cd msger-native && npm run build",
19
+ "build:native:wsl": "cd msger-native && npm run build:wsl",
20
+ "build:native:arm64": "cd msger-native && npm run build:arm64",
21
+ "build:native:pi": "cd msger-native && npm run build:pi",
22
+ "build:native:all": "npm run build:native && npm run build:native:wsl && (npm run build:native:pi || true)",
23
+ "setup:arm64": "wsl bash msger-native/setup-arm64-toolchain.sh",
24
+ "build:ts": "tsc",
25
+ "watch": "tsc -w",
26
+ "clean": "rm -rf *.js *.d.ts *.js.map bin && cd msger-native && cargo clean",
27
+ "test": "node test.js",
28
+ "postinstall": "node postinstall.js",
29
+ "prepublishOnly": "npm run build:ts && npm run build:native:all",
30
+ "prerelease:local": "git add -A && (git diff-index --quiet HEAD || git commit -m \"Pre-release commit\")",
31
+ "preversion": "npm run build:ts && npm run build:native:all && git add -A",
32
+ "postversion": "git push && git push --tags",
33
+ "release": "npm run prerelease:local && npm version patch && npm publish",
34
+ "installer": "npm run release && npm cache clean --force && npm install -g @bobfrankston/msger@latest && wsl npm cache clean --force && wsl npm install -g @bobfrankston/msger@latest"
35
+ },
36
+ "keywords": [
37
+ "message-box",
38
+ "dialog",
39
+ "webview",
40
+ "rust",
41
+ "native",
42
+ "cross-platform",
43
+ "typescript"
44
+ ],
45
+ "author": "Bob Frankston",
46
+ "license": "ISC",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/BobFrankston/msger.git"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "^24.9.1"
56
+ },
57
+ "dependencies": {
58
+ "ansi-to-html": "^0.7.2",
59
+ "json5": "^2.2.3"
60
+ }
61
+ }