<div dir="ltr">Hi,<div><br></div><div>I'm not sure where you're going with this, but don't Xfwm4's keyboard shortcuts for tiling already do that..? (Plus the drag-to-screen-border action)</div><div><br></div><div>Anyway, would be interesting for me to know what the plugin should do - especially if it's more than tiling left/right/top/bottom. Maybe the scope would also make it easier to help you.</div><div><br></div><div>Cheers</div><div>Simon</div><div><br></div><div>PS: It'd be hacky I guess, but you could just as well create a script that simulates the keypresses for Xfwm4's keyboard shortcuts and then create launchers in the panel which tile your currently active window...<br></div><div><br></div><div><br><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 25, 2018 at 8:46 PM Matthew Brush <<a href="mailto:mbrush@codebrainz.ca">mbrush@codebrainz.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2018-02-24 10:58 PM, Wim Stockman wrote:<br>
> Hello<br>
><br>
> I'm making a tiling plugin for xfce4 panel<br>
> I need to get the focused window to resize it. I'm using the deprecated<br>
> function for the moment.<br>
> but I would like to use a non deprecated function and I looked into the<br>
> wnck but it is so heavy on resources. I'd prefare a gdk (x11) way.<br>
> Can somebody point me in a direction?<br>
><br>
<br>
Hi,<br>
<br>
If it were me, I'd use the deprecated function since it won't be removed<br>
in GTK+3 and by the time your code is ported to GTK+4, you'll have much<br>
larger things to worry about.<br>
<br>
Another solution would be to just use Xlib directly and read the<br>
_NET_ACTIVE_WINDOW[0] property on your own, and/or copy the code from<br>
the deprecated function's implementation[1].<br>
<br>
As far as wnck being heavy on resources, I'm not sure what that means,<br>
but since Xfwm4 is already using it[2], I don't think it will add any<br>
additional memory overhead (unless you're not using Xfwm4 or anything<br>
else that uses libwnck), if that's what you meant.<br>
<br>
Regards,<br>
Matthew Brush<br>
<br>
[0]:<br>
<a href="https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472702304" rel="noreferrer" target="_blank">https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472702304</a><br>
[1]:<br>
<a href="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/gdk/x11/gdkscreen-x11.c#L1185" rel="noreferrer" target="_blank">https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/gdk/x11/gdkscreen-x11.c#L1185</a><br>
[2]: <a href="https://git.xfce.org/xfce/xfwm4/tree/configure.ac.in?h=xfce-4.12#n95" rel="noreferrer" target="_blank">https://git.xfce.org/xfce/xfwm4/tree/configure.ac.in?h=xfce-4.12#n95</a><br>
_______________________________________________<br>
Xfce4-dev mailing list<br>
<a href="mailto:Xfce4-dev@xfce.org" target="_blank">Xfce4-dev@xfce.org</a><br>
<a href="https://mail.xfce.org/mailman/listinfo/xfce4-dev" rel="noreferrer" target="_blank">https://mail.xfce.org/mailman/listinfo/xfce4-dev</a></blockquote></div></div></div>