A click on a window and a task-list click now go through WmState::handle_request(Activate) instead of emitting Focus/Raise directly, so the window manager's own focus and stacking state stays in step with what the compositor shows. Also refreshes scene's generated interface (SceneGraph.popups). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ff933ce54
commit
0b9af11232
2 files changed
+7
-5
No files matched your search
@@ -438,10 +438,9 @@ pub fn MoonPlasmaCompositor::handle_gfx_events(
|
|||||||
px < win.geometry.x + win.geometry.w &&
|
px < win.geometry.x + win.geometry.w &&
|
||||||
py >= win.geometry.y - 32 &&
|
py >= win.geometry.y - 32 &&
|
||||||
py < win.geometry.y + win.geometry.h {
|
py < win.geometry.y + win.geometry.h {
|
||||||
self.apply_actions([
|
self.apply_actions(
|
||||||
@wm.WmAction::Focus(wid),
|
self.wm.handle_request(wid, @wm.WindowRequest::Activate, self.work_area),
|
||||||
@wm.WmAction::Raise(wid),
|
)
|
||||||
])
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
None => ()
|
None => ()
|
||||||
@@ -753,7 +752,9 @@ fn MoonPlasmaCompositor::activate_task(self : MoonPlasmaCompositor, wid : UInt64
|
|||||||
self.wm.handle_request(wid, @wm.WindowRequest::Minimize(false), self.work_area),
|
self.wm.handle_request(wid, @wm.WindowRequest::Minimize(false), self.work_area),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
self.apply_actions([@wm.WmAction::Focus(wid), @wm.WmAction::Raise(wid)])
|
self.apply_actions(
|
||||||
|
self.wm.handle_request(wid, @wm.WindowRequest::Activate, self.work_area),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
///| Carry out what panel modules asked for: focus a window, switch layout.
|
///| Carry out what panel modules asked for: focus a window, switch layout.
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ pub(all) struct SceneGraph {
|
|||||||
mut windows : Array[WindowSceneNode]
|
mut windows : Array[WindowSceneNode]
|
||||||
mut panel_ops : Array[DrawOp]
|
mut panel_ops : Array[DrawOp]
|
||||||
mut widgets : Array[PanelWidgetNode]
|
mut widgets : Array[PanelWidgetNode]
|
||||||
|
mut popups : Array[(Rect, ShmBufferSnapshot)]
|
||||||
}
|
}
|
||||||
pub fn SceneGraph::new(Int32, Int32) -> Self
|
pub fn SceneGraph::new(Int32, Int32) -> Self
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user