Live presenter annotations + keep styling out of saved .md #5
2 changed files with 11 additions and 0 deletions
|
|
@ -5,6 +5,11 @@ import desktop_multi_window
|
|||
class MainFlutterWindow: NSWindow {
|
||||
override func awakeFromNib() {
|
||||
let flutterViewController = FlutterViewController()
|
||||
// Keep hover events flowing while this window is not key (e.g. when a
|
||||
// dialog or the beamer window is in front): otherwise an element that was
|
||||
// hovered when the window lost key status keeps its hover styling because
|
||||
// the matching exit event is never delivered.
|
||||
flutterViewController.mouseTrackingMode = .inActiveApp
|
||||
let windowFrame = self.frame
|
||||
self.contentViewController = flutterViewController
|
||||
self.setFrame(windowFrame, display: true)
|
||||
|
|
|
|||
|
|
@ -107,6 +107,12 @@ class MultiWindowManager: NSObject {
|
|||
let project = FlutterDartProject()
|
||||
project.dartEntrypointArguments = ["multi_window", windowId, config.arguments]
|
||||
let flutterViewController = FlutterViewController(project: project)
|
||||
// By default Flutter only delivers hover (mouse-moved) events to the
|
||||
// key window. The audience/beamer window is borderless and never
|
||||
// becomes key (the keyboard must stay with the presenter), so without
|
||||
// this it would never see hover at all — and state set by a click
|
||||
// (e.g. a chart highlight) would never be cleared again.
|
||||
flutterViewController.mouseTrackingMode = .inActiveApp
|
||||
window.contentViewController = flutterViewController
|
||||
window.setFrame(NSRect(x: 0, y: 0, width: 800, height: 600), display: true)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue