wnck_screen_get_default() in panel plugin

Simon Steinbeiss simon at xfce.org
Tue Nov 19 10:01:10 CET 2019


Hi,

to get a bit more context - where's the code for this plugin?
To be honest I don't know this plugin, it's not on git.xfce (which doesn't
mean it doesn't exist ofc).

Also in terms of the functionality I don't understand why this is
implemented as a plugin to the panel and not a simple standalone service.
There's no need to see the plugin at all times in a panel and the
functionality isn't related to the panel at all...

Cheers
Simon


On Mon, Nov 18, 2019 at 9:27 PM Dani <dani at damufo.com> wrote:

> Hello:
>
> In a panel plugin
> xfce4-panel(main): version 4.12.1 on gtk+ 2.24.31 (2.24.31), glib 2.50.3
> (2.50.2)
>
> PKG_CHECK_MODULES(GTK REQUIRED libxfce4panel-1.0 libxfce4ui-1 libwnck-3.0)
> also
> PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0 libxfce4panel-2.0 libxfce4ui-2
> libwnck-3.0)
>
>
> #define WNCK_I_KNOW_THIS_IS_UNSTABLE  1
> #include <libwnck/libwnck.h>
>
>
> static void constructor(XfcePanelPlugin *plugin) {
>      HotCorner * hotCorner = hotCorner_new(plugin);
>      xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
>      set_monitor_size(hotCorner);
>      xfce_panel_plugin_menu_show_configure (plugin);
>
>      WnckScreen *screenwnck = wnck_screen_get_default ();
> ...
>
>
>
>
> This line:
> WnckScreen *screen = wnck_screen_get_default ();
>
> when
> $ PANEL_DEBUG=1 xfce4-panel
>
>
> (wrapper-1.0:27298): GLib-GObject-WARNING **: cannot register existing
> type 'GdkDisplay'
>
> (wrapper-1.0:27298): GLib-CRITICAL **: g_once_init_leave: assertion
> 'result != 0' failed
>
> (wrapper-1.0:27298): GLib-GObject-CRITICAL **: g_type_register_static:
> assertion 'parent_type > 0' failed
>
> (wrapper-1.0:27298): GLib-GObject-CRITICAL **:
> g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE
> (instance_type)' failed
>
> (wrapper-1.0:27298): GLib-CRITICAL **: g_once_init_leave: assertion
> 'result != 0' failed
>
>
>
>
>
> This line
> GdkScreen * screen = gdk_screen_get_default();
> work fine.
>
> This is a bug?
> Any idea how to make it work?
>
> --
> Dani
>
>
>
> _______________________________________________
> 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/20191119/1f3cf229/attachment.html>


More information about the Xfce4-dev mailing list