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
90c72956
Commit
90c72956
authored
Oct 18, 2025
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print every monitors information for debugging
parent
bd59da4b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
controlCenter.vala
src/controlCenter/controlCenter.vala
+1
-0
functions.vala
src/functions.vala
+11
-0
main.vala
src/main.vala
+16
-0
notificationWindow.vala
src/notificationWindow/notificationWindow.vala
+2
-0
No files found.
src/controlCenter/controlCenter.vala
View file @
90c72956
...
@@ -434,6 +434,7 @@ namespace SwayNotificationCenter {
...
@@ -434,6 +434,7 @@ namespace SwayNotificationCenter {
}
}
public
void
set_monitor
(
Gdk
.
Monitor
?
monitor
)
{
public
void
set_monitor
(
Gdk
.
Monitor
?
monitor
)
{
debug
(
"Setting monitor for ControlCenter: %s"
,
Functions
.
monitor_to_string
(
monitor
));
this
.
monitor_name
=
monitor
==
null
?
null
:
monitor
.
connector
;
this
.
monitor_name
=
monitor
==
null
?
null
:
monitor
.
connector
;
GtkLayerShell
.
set_monitor
(
this
,
monitor
);
GtkLayerShell
.
set_monitor
(
this
,
monitor
);
}
}
...
...
src/functions.vala
View file @
90c72956
...
@@ -409,5 +409,16 @@ namespace SwayNotificationCenter {
...
@@ -409,5 +409,16 @@ namespace SwayNotificationCenter {
return
null
;
return
null
;
}
}
public
static
string
?
monitor_to_string
(
Gdk
.
Monitor
?
monitor
)
{
if
(
monitor
==
null
)
{
return
null
;
}
return
"%s, %ix%i, x:%i y:%i, scale:%f\n"
.
printf
(
monitor
.
get_description
(),
monitor
.
geometry
.
width
,
monitor
.
geometry
.
height
,
monitor
.
geometry
.
x
,
monitor
.
geometry
.
y
,
monitor
.
scale
);
}
}
}
}
}
src/main.vala
View file @
90c72956
...
@@ -70,6 +70,9 @@ namespace SwayNotificationCenter {
...
@@ -70,6 +70,9 @@ namespace SwayNotificationCenter {
error
(
"Could not get Display!"
);
error
(
"Could not get Display!"
);
}
}
monitors
=
display
.
get_monitors
();
monitors
=
display
.
get_monitors
();
assert_nonnull
(
monitors
);
print_monitors
();
swaync_daemon
=
new
SwayncDaemon
();
swaync_daemon
=
new
SwayncDaemon
();
Bus
.
own_name
(
BusType
.
SESSION
,
"org.erikreider.swaync.cc"
,
Bus
.
own_name
(
BusType
.
SESSION
,
"org.erikreider.swaync.cc"
,
...
@@ -85,6 +88,19 @@ namespace SwayNotificationCenter {
...
@@ -85,6 +88,19 @@ namespace SwayNotificationCenter {
add_window
(
swaync_daemon
.
noti_daemon
.
control_center
);
add_window
(
swaync_daemon
.
noti_daemon
.
control_center
);
}
}
private
void
print_monitors
()
{
uint
num_monitors
=
monitors
.
get_n_items
();
string
monitors_string
=
""
;
for
(
uint
i
=
0
;
i
<
num_monitors
;
i
++)
{
Gdk
.
Monitor
?
mon
=
(
Gdk
.
Monitor
)
monitors
.
get_item
(
i
);
if
(
mon
==
null
)
{
continue
;
}
monitors_string
+=
Functions
.
monitor_to_string
(
mon
);
}
info
(
"Monitors:\n%s"
,
monitors_string
);
}
void
on_cc_bus_aquired
(
DBusConnection
conn
)
{
void
on_cc_bus_aquired
(
DBusConnection
conn
)
{
try
{
try
{
conn
.
register_object
(
"/org/erikreider/swaync/cc"
,
swaync_daemon
);
conn
.
register_object
(
"/org/erikreider/swaync/cc"
,
swaync_daemon
);
...
...
src/notificationWindow/notificationWindow.vala
View file @
90c72956
...
@@ -330,6 +330,7 @@ namespace SwayNotificationCenter {
...
@@ -330,6 +330,7 @@ namespace SwayNotificationCenter {
}
}
// Display a new notification if the old one isn't visible
// Display a new notification if the old one isn't visible
debug
(
"Could not find floating notification to replace: %u"
,
id
);
add_notification
(
new_params
);
add_notification
(
new_params
);
}
}
...
@@ -355,6 +356,7 @@ namespace SwayNotificationCenter {
...
@@ -355,6 +356,7 @@ namespace SwayNotificationCenter {
}
}
public
void
set_monitor
(
Gdk
.
Monitor
?
monitor
)
{
public
void
set_monitor
(
Gdk
.
Monitor
?
monitor
)
{
debug
(
"Setting monitor for ControlCenter: %s"
,
Functions
.
monitor_to_string
(
monitor
));
NotificationWindow
.
monitor_name
=
monitor
==
null
?
null
:
monitor
.
connector
;
NotificationWindow
.
monitor_name
=
monitor
==
null
?
null
:
monitor
.
connector
;
GtkLayerShell
.
set_monitor
(
this
,
monitor
);
GtkLayerShell
.
set_monitor
(
this
,
monitor
);
}
}
...
...
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