Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-notification-center
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-shell-notification-center
Commits
5fa4ce83
Commit
5fa4ce83
authored
Feb 18, 2026
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set floating notification layer keyboard mode to ON_DEMAND after map. Fixes #455
parent
e38e4742
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
notificationWindow.vala
src/notificationWindow/notificationWindow.vala
+15
-19
No files found.
src/notificationWindow/notificationWindow.vala
View file @
5fa4ce83
...
...
@@ -42,9 +42,13 @@ namespace SwayNotificationCenter {
surface
.
disconnect
(
id
);
debug
(
"NotificationWindow mapped on monitor: %s"
,
Functions
.
monitor_to_string
(
monitor
));
// Only set ON_DEMAND after the surface has been mapped
set_keyboard_mode
();
});
});
this
.
unmap
.
connect
(()
=>
{
set_keyboard_mode
();
debug
(
"NotificationWindow un-mapped"
);
});
...
...
@@ -85,6 +89,16 @@ namespace SwayNotificationCenter {
base
.
snapshot
(
snapshot
);
}
private
inline
void
set_keyboard_mode
()
{
if
(
app
.
use_layer_shell
)
{
if
(
app
.
has_layer_on_demand
&&
get_mapped
())
{
GtkLayerShell
.
set_keyboard_mode
(
this
,
GtkLayerShell
.
KeyboardMode
.
ON_DEMAND
);
}
else
{
GtkLayerShell
.
set_keyboard_mode
(
this
,
GtkLayerShell
.
KeyboardMode
.
NONE
);
}
}
}
private
void
set_anchor
()
{
debug
(
"NotificationWindow set_anchor"
);
if
(
app
.
use_layer_shell
)
{
...
...
@@ -261,14 +275,8 @@ namespace SwayNotificationCenter {
if
(
notification
.
has_inline_reply
)
{
inline_reply_notifications
.
remove
(
param
.
applied_id
);
if
(
inline_reply_notifications
.
is_empty
&&
app
.
use_layer_shell
&&
GtkLayerShell
.
get_keyboard_mode
(
this
)
!=
GtkLayerShell
.
KeyboardMode
.
NONE
)
{
GtkLayerShell
.
set_keyboard_mode
(
this
,
GtkLayerShell
.
KeyboardMode
.
NONE
);
}
}
// Remove notification and its destruction timeout
notification
.
remove_noti_timeout
();
list
.
remove
.
begin
(
notification
,
transition
,
(
obj
,
res
)
=>
{
...
...
@@ -286,18 +294,6 @@ namespace SwayNotificationCenter {
ConfigModel
.
instance
.
timeout
,
ConfigModel
.
instance
.
timeout_low
,
ConfigModel
.
instance
.
timeout_critical
);
if
(
noti
.
has_inline_reply
)
{
inline_reply_notifications
.
add
(
param
.
applied_id
);
if
(
app
.
use_layer_shell
&&
GtkLayerShell
.
get_keyboard_mode
(
this
)
!=
GtkLayerShell
.
KeyboardMode
.
ON_DEMAND
&&
app
.
has_layer_on_demand
)
{
GtkLayerShell
.
set_keyboard_mode
(
this
,
GtkLayerShell
.
KeyboardMode
.
ON_DEMAND
);
}
}
if
(!
visible
)
{
// Destroy the wl_surface to get a new "enter-monitor" signal and
// fixes issues where keyboard shortcuts stop working after clearing
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment