|
| @@ -271,8 +272,8 @@ func (wm *WorkspaceManager) OnWorkspaceMessage(source *webkit.WebView, msg messa |
| 271 | | if err != nil { | 272 | | if err != nil { |
| 272 | | log.Printf("[workspace] split failed: %v", err) | 273 | | log.Printf("[workspace] split failed: %v", err) |
| 273 | | // CRITICAL FIX: Pump GTK events after validation failure to clear pending operations | 274 | | // CRITICAL FIX: Pump GTK events after validation failure to clear pending operations |
| 274 | - | if webkit.IsMainThread() { | 275 | + | if glib.MainContextDefault().IsOwner() { |
| 275 | - | webkit.IterateMainLoop() | 276 | + | glib.MainContextDefault().Iteration(false) |
| 276 | | } | 277 | | } |
| 277 | | return | 278 | | return |
| 278 | | } | 279 | | } |
|
| @@ -307,8 +308,8 @@ func (wm *WorkspaceManager) OnWorkspaceMessage(source *webkit.WebView, msg messa |
| 307 | | if err != nil { | 308 | | if err != nil { |
| 308 | | log.Printf("[workspace] stack failed: %v", err) | 309 | | log.Printf("[workspace] stack failed: %v", err) |
| 309 | | // CRITICAL FIX: Pump GTK events after stack failure | 310 | | // CRITICAL FIX: Pump GTK events after stack failure |
| 310 | - | if webkit.IsMainThread() { | 311 | + | if glib.MainContextDefault().IsOwner() { |
| 311 | - | webkit.IterateMainLoop() | 312 | + | glib.MainContextDefault().Iteration(false) |
| 312 | | } | 313 | | } |
| 313 | | return | 314 | | return |
| 314 | | } | 315 | | } |
|
| @@ -459,29 +460,29 @@ func (wm *WorkspaceManager) OnWorkspaceMessage(source *webkit.WebView, msg messa |
| 459 | | // The parent pane's rendering can become corrupted after popup closes | 460 | | // The parent pane's rendering can become corrupted after popup closes |
| 460 | | if targetNode.parentPane != nil { | 461 | | if targetNode.parentPane != nil { |
| 461 | | parentNode := targetNode.parentPane | 462 | | parentNode := targetNode.parentPane |
| 462 | - | if parentNode.container != 0 && webkit.WidgetIsValid(parentNode.container) { | 463 | + | if parentNode.container != nil { |
| 463 | | log.Printf("[workspace] Fixing parent pane rendering after popup close") | 464 | | log.Printf("[workspace] Fixing parent pane rendering after popup close") |
| 464 | | | 465 | | |
| 465 | | // CRITICAL: Hide parent container to disconnect WebKitGTK rendering pipeline | 466 | | // CRITICAL: Hide parent container to disconnect WebKitGTK rendering pipeline |
| 466 | - | webkit.WidgetHide(parentNode.container) | 467 | + | parentNode.container.Hide() |
| 467 | | | 468 | | |
| 468 | | // Schedule showing and forcing GTK to reconnect rendering | 469 | | // Schedule showing and forcing GTK to reconnect rendering |
| 469 | | wm.scheduleIdleGuarded(func() bool { | 470 | | wm.scheduleIdleGuarded(func() bool { |
| 470 | - | if parentNode == nil || !parentNode.widgetValid || parentNode.container == 0 { | 471 | + | if parentNode == nil || !parentNode.widgetValid || parentNode.container == nil { |
| 471 | | return false | 472 | | return false |
| 472 | | } | 473 | | } |
| 473 | | // Show widget to reconnect WebKit rendering pipeline | 474 | | // Show widget to reconnect WebKit rendering pipeline |
| 474 | - | webkit.WidgetShow(parentNode.container) | 475 | + | parentNode.container.Show() |
| 475 | | // Force GTK to recalculate size and recreate rendering surface | 476 | | // Force GTK to recalculate size and recreate rendering surface |
| 476 | - | webkit.WidgetQueueResize(parentNode.container) | 477 | + | parentNode.container.QueueResize() |
| 477 | - | webkit.WidgetQueueDraw(parentNode.container) | 478 | + | parentNode.container.QueueDraw() |
| 478 | | | 479 | | |
| 479 | | // Also queue resize+draw on the WebView widget itself | 480 | | // Also queue resize+draw on the WebView widget itself |
| 480 | | if parentNode.pane != nil && parentNode.pane.WebView() != nil { | 481 | | if parentNode.pane != nil && parentNode.pane.WebView() != nil { |
| 481 | | webViewWidget := parentNode.pane.WebView().Widget() | 482 | | webViewWidget := parentNode.pane.WebView().Widget() |
| 482 | - | if webViewWidget != 0 && webkit.WidgetIsValid(webViewWidget) { | 483 | + | if webViewWidget != nil { |
| 483 | - | webkit.WidgetQueueResize(webViewWidget) | 484 | + | webViewWidget.QueueResize() |
| 484 | - | webkit.WidgetQueueDraw(webViewWidget) | 485 | + | webViewWidget.QueueDraw() |
| 485 | | log.Printf("[workspace] Queued resize+draw for parent WebView widget") | 486 | | log.Printf("[workspace] Queued resize+draw for parent WebView widget") |
| 486 | | } | 487 | | } |
| 487 | | } | 488 | | } |