mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
surface: make pending and current embedded structs
This commit is contained in:
parent
64836ddfe7
commit
3c0d672ebd
11 changed files with 127 additions and 134 deletions
|
|
@ -200,8 +200,8 @@ static void roots_cursor_update_position(
|
|||
case ROOTS_CURSOR_ROTATE:
|
||||
view = roots_seat_get_focus(seat);
|
||||
if (view != NULL) {
|
||||
int ox = view->x + view->wlr_surface->current->width/2,
|
||||
oy = view->y + view->wlr_surface->current->height/2;
|
||||
int ox = view->x + view->wlr_surface->current.width/2,
|
||||
oy = view->y + view->wlr_surface->current.height/2;
|
||||
int ux = cursor->offs_x - ox,
|
||||
uy = cursor->offs_y - oy;
|
||||
int vx = cursor->cursor->x - ox,
|
||||
|
|
@ -239,12 +239,12 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
|
|||
break;
|
||||
case BTN_RIGHT:
|
||||
edges = 0;
|
||||
if (sx < view->wlr_surface->current->width/2) {
|
||||
if (sx < view->wlr_surface->current.width/2) {
|
||||
edges |= WLR_EDGE_LEFT;
|
||||
} else {
|
||||
edges |= WLR_EDGE_RIGHT;
|
||||
}
|
||||
if (sy < view->wlr_surface->current->height/2) {
|
||||
if (sy < view->wlr_surface->current.height/2) {
|
||||
edges |= WLR_EDGE_TOP;
|
||||
} else {
|
||||
edges |= WLR_EDGE_BOTTOM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue