mirror of
https://github.com/swaywm/sway.git
synced 2025-11-04 13:29:52 -05:00
Add xdg-shell stable support
This commit is contained in:
parent
0c96d757d0
commit
88d9d43b36
8 changed files with 331 additions and 1 deletions
|
|
@ -7,6 +7,8 @@
|
|||
#include <wayland-server.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_wl_shell.h>
|
||||
#include <wlr/types/wlr_xdg_shell_v6.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include "cairo.h"
|
||||
#include "pango.h"
|
||||
#include "sway/config.h"
|
||||
|
|
@ -459,6 +461,16 @@ struct sway_container *container_at(struct sway_container *parent,
|
|||
sview->wlr_xdg_surface_v6,
|
||||
view_sx, view_sy, &_sx, &_sy);
|
||||
break;
|
||||
case SWAY_VIEW_XDG_SHELL:
|
||||
// the top left corner of the sway container is the
|
||||
// coordinate of the top left corner of the window geometry
|
||||
view_sx += sview->wlr_xdg_surface->geometry.x;
|
||||
view_sy += sview->wlr_xdg_surface->geometry.y;
|
||||
|
||||
_surface = wlr_xdg_surface_surface_at(
|
||||
sview->wlr_xdg_surface,
|
||||
view_sx, view_sy, &_sx, &_sy);
|
||||
break;
|
||||
}
|
||||
if (_surface) {
|
||||
*sx = _sx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue