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
09984317
Unverified
Commit
09984317
authored
Oct 28, 2025
by
Erik Reider
Committed by
GitHub
Oct 28, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix floating notifications input region not always being set (#665)
parent
1cc14c51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
39 deletions
+32
-39
notificationWindow.vala
src/notificationWindow/notificationWindow.vala
+32
-39
No files found.
src/notificationWindow/notificationWindow.vala
View file @
09984317
...
@@ -34,8 +34,6 @@ namespace SwayNotificationCenter {
...
@@ -34,8 +34,6 @@ namespace SwayNotificationCenter {
[
GtkChild
]
[
GtkChild
]
unowned
AnimatedList
list
;
unowned
AnimatedList
list
;
private
Graphene
.
Rect
scrolled_window_bounds
=
Graphene
.
Rect
.
zero
();
Gee
.
HashSet
<
uint32
>
inline_reply_notifications
=
new
Gee
.
HashSet
<
uint32
>
();
Gee
.
HashSet
<
uint32
>
inline_reply_notifications
=
new
Gee
.
HashSet
<
uint32
>
();
private
static
string
?
monitor_name
=
null
;
private
static
string
?
monitor_name
=
null
;
...
@@ -174,47 +172,42 @@ namespace SwayNotificationCenter {
...
@@ -174,47 +172,42 @@ namespace SwayNotificationCenter {
}
}
private
void
set_input_region
()
{
private
void
set_input_region
()
{
Graphene
.
Rect
bounds
;
unowned
Gdk
.
Surface
?
surface
=
window
.
get_surface
();
scrolled_window
.
compute_bounds
(
this
,
out
bounds
);
if
(
surface
==
null
)
{
if
(!
bounds
.
equal
(
this
.
scrolled_window_bounds
))
{
return
;
this
.
scrolled_window_bounds
=
bounds
;
}
unowned
Gdk
.
Surface
?
surface
=
window
.
get_surface
();
if
(
surface
==
null
)
{
return
;
}
Cairo
.
Region
region
=
new
Cairo
.
Region
();
foreach
(
AnimatedListItem
item
in
list
.
visible_children
)
{
if
(
item
.
destroying
)
{
continue
;
}
Graphene
.
Rect
out_bounds
;
item
.
compute_bounds
(
this
,
out
out_bounds
);
Cairo
.
RectangleInt
item_rect
=
Cairo
.
RectangleInt
()
{
x
=
(
int
)
out_bounds
.
get_x
(),
y
=
(
int
)
out_bounds
.
get_y
(),
width
=
(
int
)
out_bounds
.
get_width
(),
height
=
(
int
)
out_bounds
.
get_height
(),
};
region
.
union_rectangle
(
item_rect
);
}
// The input region should only cover each preview widget
Cairo
.
Region
region
=
new
Cairo
.
Region
();
Graphene
.
Rect
scrollbar_bounds
;
foreach
(
AnimatedListItem
item
in
list
.
visible_children
)
{
unowned
Gtk
.
Widget
scrollbar
=
scrolled_window
.
get_vscrollbar
();
if
(
item
.
destroying
)
{
if
(
scrollbar
.
should_layout
())
{
continue
;
scrollbar
.
compute_bounds
(
this
,
out
scrollbar_bounds
);
Cairo
.
RectangleInt
rect
=
Cairo
.
RectangleInt
()
{
x
=
(
int
)
scrollbar_bounds
.
get_x
(),
y
=
(
int
)
scrollbar_bounds
.
get_y
(),
width
=
(
int
)
scrollbar_bounds
.
get_width
(),
height
=
(
int
)
scrollbar_bounds
.
get_height
(),
};
region
.
union_rectangle
(
rect
);
}
}
Graphene
.
Rect
out_bounds
;
item
.
compute_bounds
(
this
,
out
out_bounds
);
Cairo
.
RectangleInt
item_rect
=
Cairo
.
RectangleInt
()
{
x
=
(
int
)
out_bounds
.
get_x
(),
y
=
(
int
)
out_bounds
.
get_y
(),
width
=
(
int
)
out_bounds
.
get_width
(),
height
=
(
int
)
out_bounds
.
get_height
(),
};
region
.
union_rectangle
(
item_rect
);
}
surface
.
set_input_region
(
region
);
// The input region should only cover each preview widget
Graphene
.
Rect
scrollbar_bounds
;
unowned
Gtk
.
Widget
scrollbar
=
scrolled_window
.
get_vscrollbar
();
if
(
scrollbar
.
should_layout
())
{
scrollbar
.
compute_bounds
(
this
,
out
scrollbar_bounds
);
Cairo
.
RectangleInt
rect
=
Cairo
.
RectangleInt
()
{
x
=
(
int
)
scrollbar_bounds
.
get_x
(),
y
=
(
int
)
scrollbar_bounds
.
get_y
(),
width
=
(
int
)
scrollbar_bounds
.
get_width
(),
height
=
(
int
)
scrollbar_bounds
.
get_height
(),
};
region
.
union_rectangle
(
rect
);
}
}
surface
.
set_input_region
(
region
);
}
}
public
void
change_visibility
(
bool
value
)
{
public
void
change_visibility
(
bool
value
)
{
...
...
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