Skip to content

Commit

Permalink
fix(gtk4): correct offset variable in setCursorRect (#35)
Browse files Browse the repository at this point in the history
Fix a bug in Gtk4InputWindow::setCursorRect where the Y coordinate was
incorrectly using the X offset (offsetX) instead of the Y offset (offsetY).
This would cause incorrect vertical positioning of the input window.
  • Loading branch information
lzwind authored Feb 27, 2025
1 parent 53cf2b7 commit f0dcd4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gtk4/gtk4inputwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void Gtk4InputWindow::setCursorRect(GdkRectangle rect) {
gtk_native_get_surface_transform(native, &offsetX, &offsetY);
}
rect.x = px + offsetX;
rect.y = py + offsetX;
rect.y = py + offsetY;

// Sanitize the rect value to workaround a mutter bug:
// https://gitlab.gnome.org/GNOME/mutter/-/issues/2525
Expand Down

0 comments on commit f0dcd4f

Please sign in to comment.