Re: gdk_screen_get_active_window’ is deprecated Alternative ?
Simon Steinbeiss
simon at xfce.org
Sun Feb 25 23:36:48 CET 2018
Hi,
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)
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.
Cheers
Simon
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...
On Sun, Feb 25, 2018 at 8:46 PM Matthew Brush <mbrush at codebrainz.ca> wrote:
> On 2018-02-24 10:58 PM, Wim Stockman wrote:
> > Hello
> >
> > I'm making a tiling plugin for xfce4 panel
> > I need to get the focused window to resize it. I'm using the deprecated
> > function for the moment.
> > but I would like to use a non deprecated function and I looked into the
> > wnck but it is so heavy on resources. I'd prefare a gdk (x11) way.
> > Can somebody point me in a direction?
> >
>
> Hi,
>
> If it were me, I'd use the deprecated function since it won't be removed
> in GTK+3 and by the time your code is ported to GTK+4, you'll have much
> larger things to worry about.
>
> Another solution would be to just use Xlib directly and read the
> _NET_ACTIVE_WINDOW[0] property on your own, and/or copy the code from
> the deprecated function's implementation[1].
>
> As far as wnck being heavy on resources, I'm not sure what that means,
> but since Xfwm4 is already using it[2], I don't think it will add any
> additional memory overhead (unless you're not using Xfwm4 or anything
> else that uses libwnck), if that's what you meant.
>
> Regards,
> Matthew Brush
>
> [0]:
>
> https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472702304
> [1]:
>
> https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/gdk/x11/gdkscreen-x11.c#L1185
> [2]: https://git.xfce.org/xfce/xfwm4/tree/configure.ac.in?h=xfce-4.12#n95
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20180225/0f7ec570/attachment.html>
More information about the Xfce4-dev
mailing list