Check for button position more in Rust
The check against fitting inside the Layout was removed: as an optimization it is unneeded, as the actual search must be optimized to be quick. In addition, the view bounds don't correspond to anything physical as long as negative offsets are allowed.
This commit is contained in:
committed by
David Boddie
parent
2d7dddd505
commit
75992ff13f
@ -117,7 +117,8 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
||||
struct button_place place = squeek_view_find_key(
|
||||
view, squeek_button_get_key(head->data)
|
||||
);
|
||||
render_pressed_button (self, &place);
|
||||
if (place.button)
|
||||
render_pressed_button (self, &place);
|
||||
}
|
||||
|
||||
/* redraw locked key */
|
||||
@ -128,7 +129,8 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
|
||||
((EekModifierKey *)head->data)->button
|
||||
)
|
||||
);
|
||||
render_locked_button (self, &place);
|
||||
if (place.button)
|
||||
render_locked_button (self, &place);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user