mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 14:00:29 +00:00
Refactor gtk_enable_primary_paste to remove optional type and simplify condition checks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user