mirror of
https://github.com/NickHu/sway
synced 2024-12-26 21:58:30 +01:00
Chase wlr_xdg_surface breaking changes
See [1]. [1]: https://github.com/swaywm/wlroots/pull/3106
This commit is contained in:
parent
1bd8e3b469
commit
c43f1fbf1c
2 changed files with 7 additions and 7 deletions
|
@ -483,8 +483,8 @@ static struct sway_layer_surface *popup_get_layer(
|
|||
static void popup_damage(struct sway_layer_popup *layer_popup, bool whole) {
|
||||
struct wlr_xdg_popup *popup = layer_popup->wlr_popup;
|
||||
struct wlr_surface *surface = popup->base->surface;
|
||||
int popup_sx = popup->geometry.x - popup->base->geometry.x;
|
||||
int popup_sy = popup->geometry.y - popup->base->geometry.y;
|
||||
int popup_sx = popup->geometry.x - popup->base->current.geometry.x;
|
||||
int popup_sy = popup->geometry.y - popup->base->current.geometry.y;
|
||||
int ox = popup_sx, oy = popup_sy;
|
||||
struct sway_layer_surface *layer;
|
||||
while (true) {
|
||||
|
|
|
@ -27,8 +27,8 @@ static void popup_get_view_coords(struct sway_view_child *child,
|
|||
struct wlr_xdg_surface *surface = popup->wlr_xdg_surface;
|
||||
|
||||
wlr_xdg_popup_get_toplevel_coords(surface->popup,
|
||||
surface->popup->geometry.x - surface->geometry.x,
|
||||
surface->popup->geometry.y - surface->geometry.y,
|
||||
surface->popup->geometry.x - surface->current.geometry.x,
|
||||
surface->popup->geometry.y - surface->current.geometry.y,
|
||||
sx, sy);
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
|||
|
||||
if (view->container->node.instruction) {
|
||||
transaction_notify_view_ready_by_serial(view,
|
||||
xdg_surface->configure_serial);
|
||||
xdg_surface->current.configure_serial);
|
||||
}
|
||||
|
||||
view_damage_from(view);
|
||||
|
@ -425,8 +425,8 @@ static void handle_map(struct wl_listener *listener, void *data) {
|
|||
struct sway_view *view = &xdg_shell_view->view;
|
||||
struct wlr_xdg_surface *xdg_surface = view->wlr_xdg_surface;
|
||||
|
||||
view->natural_width = view->wlr_xdg_surface->geometry.width;
|
||||
view->natural_height = view->wlr_xdg_surface->geometry.height;
|
||||
view->natural_width = view->wlr_xdg_surface->current.geometry.width;
|
||||
view->natural_height = view->wlr_xdg_surface->current.geometry.height;
|
||||
if (!view->natural_width && !view->natural_height) {
|
||||
view->natural_width = view->wlr_xdg_surface->surface->current.width;
|
||||
view->natural_height = view->wlr_xdg_surface->surface->current.height;
|
||||
|
|
Loading…
Reference in a new issue