Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Git Version | Version Git xkl_engine_get_state returns incorrect group value in 64-bits (KDE+XFCE) - Applet Keyboard
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Git Version | Version Git

Subjects Author Language Messages Last message
[Locked] xkl_engine_get_state returns incorrect group value in 64-bits (KDE+XFCE) - Applet Keyboard
Page : 1 2 3 4 5 6
FrankKubuntu Français 115 FrankKubuntu [Read]
01 January 2013 à 14:56

vas.pup, Thursday 13 December 2012 à 22:51


Subscription date : 13 December 2012
Messages : 8
Hi,
I read the thread through the google translate, and I hope that I don't missing anything.
I'd like to confirm that on my XFCE environment the applet is not working, however when I switching to Unity/Gnome shells it works as expected.

Can I provide any help in testing / checking ?

Thanks,
Vasya.

BTW cairo-dock rocks! thx

vas.pup, Thursday 13 December 2012 à 22:52


Subscription date : 13 December 2012
Messages : 8
Hi,
I read the thread through the google translate, and I hope that I don't missing anything.
I'd like to confirm that on my XFCE environment the applet is not working, however when I switching to Unity/Gnome shells it works as expected.

Can I provide any help in testing / checking ?

Thanks,
Vasya.

BTW cairo-dock rocks! thx

FrankKubuntu, Friday 14 December 2012 à 14:05


Subscription date : 21 October 2009
Messages : 1575
@matttbe @fab, is Unity/Gnome using a different lib than KDE with libxklavier?

FrankKubuntu, Friday 14 December 2012 à 18:05


Subscription date : 21 October 2009
Messages : 1575
Yes it does, according to libxklavier's dev.
It uses XKB API directly.

I wonder if CD could by-pass libxklavier's layer and access XKB API directly?

But first we will try libxklavier dev's suggestion and patch.

matttbe, Saturday 15 December 2012 à 17:02


Subscription date : 24 January 2009
Messages : 12573
But first we will try libxklavier dev's suggestion and patch.
Is it better with this new patch/suggestion?

FrankKubuntu, Saturday 15 December 2012 à 17:16


Subscription date : 21 October 2009
Messages : 1575
Not yet. I get this error:

g_object_unref: assertion `G_IS_OBJECT (object)' failed
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
cd_xkbd_set_group: assertion `bSuccess' failed


Waiting for dev to reply.

Or maybe this one could be CD to check?

matttbe, Saturday 15 December 2012 à 17:19


Subscription date : 24 January 2009
Messages : 12573
It seems that xkl_engine_get_state (pEngine, Xid, &state); returns false ==> https://bazaar.launchpad.net/~cairo-dock-team/cairo-dock-plug-ins/plug-ins/view/head:/keyboard-indicator/src/applet-xklavier.c#L38

FrankKubuntu, Saturday 15 December 2012 à 17:24


Subscription date : 21 October 2009
Messages : 1575
Which is still the original problem.

BTW is that indicator supposed to show the CAPS LOCK and NUM LOCK?
I have no icon on top left showing a lock. It was there when CD loaded, then I changed window and it disappeared, can't have it back. Clicking on the CAPS LOCK key on my kbd does not return any debug line.

matttbe, Saturday 15 December 2012 à 17:33


Subscription date : 24 January 2009
Messages : 12573
BTW is that indicator supposed to show the CAPS LOCK and NUM LOCK?
Yes but it seems it was a bit buggy and if the dock has been compiled with GTK3, the dock is now using gdk functions. It's much better for me but is it buggy on KDE/XFCE?

FrankKubuntu, Saturday 15 December 2012 à 17:57


Subscription date : 21 October 2009
Messages : 1575
For KDE The indicator shows one time when CD loads, as soon as you switch app, it vanishes and never comes back again. Then if I hit my caps lock key, nothing happens, no debug.

I do not have a num lock key so I cannot test that one.

FrankKubuntu, Saturday 15 December 2012 à 18:00


Subscription date : 21 October 2009
Messages : 1575
How can I make sure CD is using the latest libxklavier version?

$ ldd /usr/bin/cairo-dock | grep xkl
$


It returns no result.

FrankKubuntu, Saturday 15 December 2012 à 18:20


Subscription date : 21 October 2009
Messages : 1575
$ ldd /usr/lib/cairo-dock/libcd-keyboard-indicator.so | grep xkl
libxklavier.so.16 => /usr/lib/libxklavier.so.16 (0x00007f97ccf23000)

FrankKubuntu, Saturday 15 December 2012 à 18:33


Subscription date : 21 October 2009
Messages : 1575
The lock icon is back after I changed font color. I switch window and it's still there, but I can't de/activate it.

matttbe, Saturday 15 December 2012 à 18:36


Subscription date : 24 January 2009
Messages : 12573
Yep. Note that if you change some header files (e.g. headers files from libxklavier), don't forget to recompile the corresponding plugin.

Then if I hit my caps lock key, nothing happens, no debug.
Arf, hard to debug this problem for me This is what I have:
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-init.c:_init:56)
INIT XKBD
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:33555237)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : -1 -> 0 ; indic : 0 -> 2
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:135)
group name : Belgian (2 groups)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-draw.c:cd_xkbd_update_icon:60)
KEYBOARD: 88x66 / 56x56
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-draw.c:cd_xkbd_render_step_opengl:147)
cd_xkbd_render_step_opengl (1,00; 28,00x28,00)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-draw.c:cd_xkbd_update_icon:102)
XKBD: caps-lock: 0; num-lock: 2
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:41943046)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : 0 -> 0 ; indic : 2 -> 0
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-draw.c:cd_xkbd_update_icon:102)
XKBD: caps-lock: 0; num-lock: 0
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:41943046)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : 0 -> 0 ; indic : 0 -> 0
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:41943046)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : 0 -> 0 ; indic : 0 -> 2
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-draw.c:cd_xkbd_update_icon:102)
XKBD: caps-lock: 0; num-lock: 2
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:41943046)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : 0 -> 0 ; indic : 2 -> 2
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:41943046)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : 0 -> 0 ; indic : 2 -> 3
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-draw.c:cd_xkbd_update_icon:102)
XKBD: caps-lock: 1; num-lock: 2
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:41943046)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : 0 -> 0 ; indic : 3 -> 3
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:41943046)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : 0 -> 0 ; indic : 3 -> 2
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-draw.c:cd_xkbd_update_icon:102)
XKBD: caps-lock: 0; num-lock: 2
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:85)
cd_xkbd_keyboard_state_changed (window:41943046)
debug : (/opt/cairo-dock_bzr/cairo-dock-plug-ins/keyboard-indicator/src/applet-xklavier.c:cd_xkbd_keyboard_state_changed:118)
group : 0 -> 0 ; indic : 2 -> 2
(when I hit numlock/capslock key, cd_xkbd_keyboard_state_changed function is called)

FrankKubuntu, Saturday 15 December 2012 à 19:20


Subscription date : 21 October 2009
Messages : 1575
I changed 2 words in a .c from libxklavier, I do not know if they were headers, lines 295 and 384.

But anyway I'll try to make the indicator switch languages work first.

OH!!!! Do I need to recompile CD even to make the indicator switch languages??

FrankKubuntu, Saturday 15 December 2012 à 19:37


Subscription date : 21 October 2009
Messages : 1575
No need to recompile I guess, cuz I get the same error.

I see you changed the MP icon?
Wait, interesting, I lost all my icon effects when I hover the mouse on the icons... REV 1293.

FrankKubuntu, Saturday 15 December 2012 à 19:49


Subscription date : 21 October 2009
Messages : 1575
Matttbe, the dev says everything in our hands to check why the xkl_engine_get_toplevel_window_state returns FALSE.

Can you help me adding debug lines and stuff somewhere so that I can provide answer to that question?

The dev says:

XKL_DEBUG is environment variable that has to be set before cairo-dock is executed. That way libxklaiver is producing a lot of xkl_debug messages. Actually, you can add more of them to xkl_engine_get_toplevel_window_state function if you like, rebuild and reinstall libxklavier.
Or you can add just printf, for simplicity...

Perhaps at that stage you have all instruments on your hands, try to add debug and find out why xkl_engine_get_toplevel_window_state returns FALSE... Unfortunately I do not see that issue locally.

matttbe, Saturday 15 December 2012 à 20:13


Subscription date : 24 January 2009
Messages : 12573
I see you changed the MP icon?
Wait, interesting, I lost all my icon effects when I hover the mouse on the icons... REV 1293.
No but I guess you're using Cairo-Dock without the OpenGL backend

XKL_DEBUG is environment variable that has to be set before cairo-dock is executed
It's an environment variable, no need to recompile the dock
According to xklavier.c, you need to set a number, e.g.
env XKL_DEBUG=999 cairo-dock
Then you can give output messages at startup and when you press 'capslock'

FrankKubuntu, Saturday 15 December 2012 à 20:17


Subscription date : 21 October 2009
Messages : 1575
Ok so what now?

$ export XKL_DEBUG=150
$ cairo-dock -l debug


What do I search for?

CAPS LOCK does not return one single debug line.

And the debug is the same:

g_object_unref: assertion `G_IS_OBJECT (object)' failed
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
_cairo_dock_search_icon_from_subdock (Mail)
_cairo_dock_search_icon_from_subdock (Shortcuts)
_cairo_dock_search_icon_from_subdock (Script)
_cairo_dock_search_icon_from_subdock (dolphin)
_cairo_dock_search_icon_from_subdock (_MainDock_)
[1355599042,150,xklavier_toplevel.c:xkl_engine_get_toplevel_window_state/] Appwin 240000b, 'Yakuake' does not have state
cd_xkbd_set_group: assertion `bSuccess' failed


If I try printf, I add it on top of every line with xkl_engine_get_toplevel_window_state in the .c file and recompile libxklavier?

FrankKubuntu, Saturday 15 December 2012 à 21:10


Subscription date : 21 October 2009
Messages : 1575
I googled but can't understand how to use printf debug method.

Do I need to define the function? Do I need to use "()" somewhere? Do I need stdio.h header somewhere?

Here's an example of a line with the xkl_engine_get_toplevel_window_state function:

gboolean
xkl_engine_get_toplevel_window_state(XklEngine * engine,
                 Window toplevel_win,
                 XklState * state_out)


How do I printf it?

Like this?

gboolean
printf ("xkl_engine_get_toplevel_window_state(XklEngine * engine"),
                 Window toplevel_win,
                 XklState * state_out

Git Version | Version Git

Subjects Author Language Messages Last message
[Locked] xkl_engine_get_state returns incorrect group value in 64-bits (KDE+XFCE) - Applet Keyboard
Page : 1 2 3 4 5 6
FrankKubuntu Français 115 FrankKubuntu [Read]
01 January 2013 à 14:56


Glx-Dock / Cairo-Dock List of forums Git Version | Version Git xkl_engine_get_state returns incorrect group value in 64-bits (KDE+XFCE) - Applet Keyboard Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.