Refactor gtk_enable_primary_paste to remove optional type and simplify condition checks

This commit is contained in:
evertonstz
2026-01-20 14:23:22 -03:00
parent 7b6147aa28
commit bc067fc782

View File

@@ -677,7 +677,7 @@ pub const Surface = extern struct {
/// Whether primary paste (middle-click paste) is enabled via GNOME settings.
/// If true, middle-click paste is enabled. If false, it's disabled.
gtk_enable_primary_paste: ?bool = true,
gtk_enable_primary_paste: bool = true,
pub var offset: c_int = 0;
};
@@ -2698,7 +2698,7 @@ pub const Surface = extern struct {
// Check if middle button paste should be disabled based on GNOME settings
// If gtk_enable_primary_paste is explicitly false, skip processing middle button
if (button == .middle and !(priv.gtk_enable_primary_paste)) {
if (button == .middle and !priv.gtk_enable_primary_paste) {
return;
}
@@ -2755,7 +2755,7 @@ pub const Surface = extern struct {
// Check if middle button paste should be disabled based on GNOME settings
// If gtk_enable_primary_paste is explicitly false, skip processing middle button
if (button == .middle and !(priv.gtk_enable_primary_paste)) {
if (button == .middle and !priv.gtk_enable_primary_paste) {
return;
}