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
e32ca0a0
Commit
e32ca0a0
authored
Dec 25, 2025
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed trying to set monitor when not using wlr-layer-shell
parent
a222a896
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
15 deletions
+31
-15
controlCenter.vala
src/controlCenter/controlCenter.vala
+9
-8
notificationWindow.vala
src/notificationWindow/notificationWindow.vala
+10
-7
swayncDaemon.vala
src/swayncDaemon/swayncDaemon.vala
+12
-0
No files found.
src/controlCenter/controlCenter.vala
View file @
e32ca0a0
...
...
@@ -307,6 +307,13 @@ namespace SwayNotificationCenter {
}
}
}
// Set the preferred monitor
string
?
monitor_name
=
ConfigModel
.
instance
.
control_center_preferred_output
;
if
(
this
.
monitor_name
!=
null
)
{
monitor_name
=
this
.
monitor_name
;
}
set_monitor
(
Functions
.
try_get_monitor
(
monitor_name
));
}
// Set the window margins
...
...
@@ -364,13 +371,6 @@ namespace SwayNotificationCenter {
ConfigModel
.
instance
.
control_center_height
);
box
.
set_size_request
(
ConfigModel
.
instance
.
control_center_width
,
ConfigModel
.
instance
.
control_center_height
);
// Set the preferred monitor
string
?
monitor_name
=
ConfigModel
.
instance
.
control_center_preferred_output
;
if
(
this
.
monitor_name
!=
null
)
{
monitor_name
=
this
.
monitor_name
;
}
set_monitor
(
Functions
.
try_get_monitor
(
monitor_name
));
}
public
uint
notification_count
()
{
...
...
@@ -434,7 +434,8 @@ namespace SwayNotificationCenter {
}
public
void
set_monitor
(
Gdk
.
Monitor
?
monitor
)
{
debug
(
"Setting monitor for ControlCenter: %s"
,
Functions
.
monitor_to_string
(
monitor
));
debug
(
"Setting monitor for ControlCenter: %s"
,
Functions
.
monitor_to_string
(
monitor
)
??
"Monitor Picked by Compositor"
);
this
.
monitor_name
=
monitor
==
null
?
null
:
monitor
.
connector
;
GtkLayerShell
.
set_monitor
(
this
,
monitor
);
}
...
...
src/notificationWindow/notificationWindow.vala
View file @
e32ca0a0
...
...
@@ -136,6 +136,13 @@ namespace SwayNotificationCenter {
scrolled_window
.
set_valign
(
Gtk
.
Align
.
END
);
break
;
}
// Set the preferred monitor
string
?
monitor_name
=
ConfigModel
.
instance
.
notification_window_preferred_output
;
if
(
NotificationWindow
.
monitor_name
!=
null
)
{
monitor_name
=
NotificationWindow
.
monitor_name
;
}
set_monitor
(
Functions
.
try_get_monitor
(
monitor_name
));
}
list
.
animation_reveal_type
=
AnimatedListItem
.
RevealAnimationType
.
SLIDE
;
...
...
@@ -163,12 +170,7 @@ namespace SwayNotificationCenter {
break
;
}
// Set the preferred monitor
string
?
monitor_name
=
ConfigModel
.
instance
.
notification_window_preferred_output
;
if
(
NotificationWindow
.
monitor_name
!=
null
)
{
monitor_name
=
NotificationWindow
.
monitor_name
;
}
set_monitor
(
Functions
.
try_get_monitor
(
monitor_name
));
set_input_region
();
}
private
void
set_input_region
()
{
...
...
@@ -365,7 +367,8 @@ namespace SwayNotificationCenter {
}
public
void
set_monitor
(
Gdk
.
Monitor
?
monitor
)
{
debug
(
"Setting monitor for ControlCenter: %s"
,
Functions
.
monitor_to_string
(
monitor
));
debug
(
"Setting monitor for Floating Notifications: %s"
,
Functions
.
monitor_to_string
(
monitor
)
??
"Monitor Picked by Compositor"
);
NotificationWindow
.
monitor_name
=
monitor
==
null
?
null
:
monitor
.
connector
;
GtkLayerShell
.
set_monitor
(
this
,
monitor
);
...
...
src/swayncDaemon/swayncDaemon.vala
View file @
e32ca0a0
...
...
@@ -318,6 +318,12 @@ namespace SwayNotificationCenter {
}
public
bool
set_cc_monitor
(
string
name
)
throws
DBusError
,
IOError
{
if
(!
use_layer_shell
)
{
critical
(
"Setting Control Center monitor isn't supported "
+
"when layer shell is disabled!"
);
return
false
;
}
unowned
Gdk
.
Monitor
?
monitor
=
Functions
.
try_get_monitor
(
name
);
if
(
monitor
==
null
)
{
return
false
;
...
...
@@ -328,6 +334,12 @@ namespace SwayNotificationCenter {
}
public
bool
set_noti_window_monitor
(
string
name
)
throws
DBusError
,
IOError
{
if
(!
use_layer_shell
)
{
critical
(
"Setting Notification Window monitor isn't supported "
+
"when layer shell is disabled!"
);
return
false
;
}
unowned
Gdk
.
Monitor
?
monitor
=
Functions
.
try_get_monitor
(
name
);
if
(
monitor
==
null
)
{
return
false
;
...
...
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