Re: C/C++ API to set screen for a window on Wayland

Viet Dang <[email protected]> Thu, 8 Aug 2024 01:20:47 +0100
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <CAO-rTSHJSmQE6Q7tKmGm7WjUqCPmvX8vJsKwFOEXk6=5kXw6Og@mail.gmail.com>
--00000000000041f3c4061f210006
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Aleix,

Maybe my post wasn't clear, this is for multi-screen/multi-monitor setup,
so for example I need to set the dock to screen 1 or screen 2 etc.

I've already used layer-shell to set the dock's anchor, strut, and
layer, but it doesn't seem to support setting screen/monitor?

Thanks,
Viet


On Thu, Aug 8, 2024 at 12:56=E2=80=AFAM Aleix Pol <[email protected]> wrote:

> It depends on how you're placing your surface.
>
> Given you're asking about a dock in the KWin list, you should be using
> layer-shell. It does allow setting the output when placing it:
>
> https://wayland.app/protocols/wlr-layer-shell-unstable-v1#zwlr_layer_shel=
l_v1:request:get_layer_surface
>
> As C++ API you can use layer-shell-qt:
> https://invent.kde.org/plasma/layer-shell-qt/
>
> Best of luck,
> Aleix
>
> On Thu, Aug 8, 2024 at 12:54=E2=80=AFAM Viet Dang <[email protected]> wrot=
e:
> >
> > Hi,
> >
> > On Wayland, is there any way for third-party docks to set the screen
> where the dock resides?
> >
> > I've looked through the Wayland protocol list but did not find anything
> relevant.
> >
> > Thanks a lot,
> > Viet
> >
>

--00000000000041f3c4061f210006
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Aleix,<div><br></div><div>Maybe my post wasn&#39;t clea=
r, this is for multi-screen/multi-monitor setup, so for example I need to s=
et the dock to screen 1 or screen 2 etc.</div><div><br></div><div>I&#39;ve =
already used layer-shell to set the dock&#39;s anchor, strut, and layer,=C2=
=A0but it doesn&#39;t seem to support setting screen/monitor?</div><div><br=
></div><div>Thanks,</div><div>Viet</div><div><br></div></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Aug 8, 2024 =
at 12:56=E2=80=AFAM Aleix Pol &lt;<a href=3D"mailto:[email protected]">aleix=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">It depends on how you&#39;re placing your surface.<br>
<br>
Given you&#39;re asking about a dock in the KWin list, you should be using<=
br>
layer-shell. It does allow setting the output when placing it:<br>
<a href=3D"https://wayland.app/protocols/wlr-layer-shell-unstable-v1#zwlr_l=
ayer_shell_v1:request:get_layer_surface" rel=3D"noreferrer" target=3D"_blan=
k">https://wayland.app/protocols/wlr-layer-shell-unstable-v1#zwlr_layer_she=
ll_v1:request:get_layer_surface</a><br>
<br>
As C++ API you can use layer-shell-qt:<br>
<a href=3D"https://invent.kde.org/plasma/layer-shell-qt/" rel=3D"noreferrer=
" target=3D"_blank">https://invent.kde.org/plasma/layer-shell-qt/</a><br>
<br>
Best of luck,<br>
Aleix<br>
<br>
On Thu, Aug 8, 2024 at 12:54=E2=80=AFAM Viet Dang &lt;<a href=3D"mailto:dan=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; On Wayland, is there any way for third-party docks to set the screen w=
here the dock resides?<br>
&gt;<br>
&gt; I&#39;ve looked through the Wayland protocol list but did not find any=
thing relevant.<br>
&gt;<br>
&gt; Thanks a lot,<br>
&gt; Viet<br>
&gt;<br>
</blockquote></div>

--00000000000041f3c4061f210006--