Focus floating chat from terminal shortcut
Raise the most recently used chat when Ctrl+Y is invoked from another window, then rely on the existing host lifecycle to focus its composer. Preserve toggle behavior while chat is active and retain the Apple shortcut aliases.
This commit is contained in:
@@ -139,6 +139,25 @@ void main() {
|
||||
expect(manager.groupShown('chat'), isTrue);
|
||||
});
|
||||
|
||||
test('toggleOrRaiseGroup brings a visible group over another window', () {
|
||||
final a = manager.open('chat', 'a');
|
||||
manager.open('chat', 'b');
|
||||
final terminal = manager.open('terminal', 'terminal');
|
||||
|
||||
expect(manager.active?.id, terminal.id);
|
||||
expect(manager.toggleOrRaiseGroup('chat'), isTrue);
|
||||
expect(manager.active?.contentId, 'b');
|
||||
expect(manager.groupShown('chat'), isTrue);
|
||||
|
||||
expect(manager.toggleOrRaiseGroup('chat'), isTrue);
|
||||
expect(manager.groupShown('chat'), isFalse);
|
||||
expect(manager.active?.contentId, 'terminal');
|
||||
|
||||
expect(manager.toggleOrRaiseGroup('chat'), isTrue);
|
||||
expect(manager.active?.contentId, 'b');
|
||||
expect(manager.byId(a.id), isNotNull);
|
||||
});
|
||||
|
||||
test('close remembers the frame for the content and tells the kind', () {
|
||||
final a = manager.open('chat', 'a');
|
||||
manager.setFrame(a.id, const Rect.fromLTWH(300, 200, 500, 400));
|
||||
|
||||
Reference in New Issue
Block a user