#7 bug and solution for: screen rotate button not work (XFCE)

v2.x
open
general (5)
5
2011-11-19
2011-08-11
Steffen Ewert
No

Hi,

My environment:
- Hardware: Fujitsu Lifebook T901
- OS: Scientific Linux 6.1 (kernel 2.6.32-131.6.1.el6.x86_64)
- wacom: The wacom driver of SL 6.1 (RHEL) is too old. I had install the newest input-wacom (0.11.1) and the newest xf86-input-wacom (xsetwacom --version says: 0.11.99).
- fjbtndrv: 2.2.1

I use XFCE and had install all the stuff two days ago. The first two days all runs fine. But since this morning the screen rotate button is not working. Other buttons are working ok for me. I notice this only under XFCE. With Gnome the screen rotate button seems to work (but don't forget: the first two days it's working also with XFCE without any problems).

I had then add the bug fixes for 64b systems from this thread: http://sourceforge.net/projects/fjbtndrv/forums/forum/695649/topic/4483788 (and I mean not the naked girls ... ;-) shit SPAMs! ). But without success.

I had then debug a little bit in the code and find out that if I press the screen rotate button the "handle_xinput_event(...)" was called. But the event handling for the screen rotate button is in "handle_x11_event(...)". All what I had done is add a new else to handle_xinput_event:

static void handle_xinput_event(unsigned int keycode, unsigned int state, int pressed)
{
static clock_t key_fn, key_alt;

debug("handle_xinput_event: time=%ld keycode=%d, state=%d, action=%s [fn=%ld, alt=%ld, cfg=%ld, bri=%ld]",
current_time, keycode, state, (pressed ? "pressed" : "released"),
key_fn, key_alt, mode_configure, mode_brightness);

if(keycode == 37) { // FN (Control)
...
...
...
} else if(keycode == 64) { // Alt
...
...
...
} else { // may be this is a x11 event ...
handle_x11_event(keycode, state, pressed);
}
}

I'm not a Linux or C programmer (C is more about 10 years ago ...) and so I don't know why handle_xinput_event is called instead of handle_x11_event, but this change works for me.

Regards,
Steffen

Discussion

  • Robert Gerlach
    Robert Gerlach
    2011-11-19

    • labels: --> general
    • milestone: --> v2.x
    • assigned_to: nobody --> khnz