FreeRDP-old icon indicating copy to clipboard operation
FreeRDP-old copied to clipboard

DirectFB UI: incorrect cursor tracking behavior

Open g-reno opened this issue 13 years ago • 2 comments

I'm using the DirectFB version of freerdp.

Here are my rpms: directfb-1.2.9-2.fc11.x86_64 tigervnc-0.0.90-0.10.fc11.x86_64

I'm having a problem with the cursor tracking.

When I start dfbfreerdp it starts on port 5900 and waits for a connection.

So I connect using vncviewer :0 and I can see the desktop login screen.

The problem I'm having is that the mouse pointer does not track the mouse movement properly.

The pointer only moves with X-axis motion.

Here is what the pointer track looks like as you move the mouse back and forth:

----------------------------------------------
|x                                           |
|  x                                         |
|    x                                       |
|      x                                     |
|        x                                   |
|          x                                 |
|            x                               |
|              x                             |
|                x                           |
|                  x                         |
|                    xxxxxxxxxxxxxxxxxxxxxxxx|
----------------------------------------------

I've tried every mouse protocol setting in ~/.directfbrc and they all follow this pattern.

I did some debugging and the cursor values that are being set by GetCursorPosition are those of the track diagram which of course are wrong.

Ultimately the DirectFB GetCursorPosition gets down to this code:

 653 DFBResult
 654 dfb_windowstack_get_cursor_position( CoreWindowStack *stack,
int *ret_x, int *ret_y )
 655 {
 656      D_DEBUG_AT( Core_WindowStack, "%s( %p, %p, %p )\n",
__FUNCTION__, stack, ret_x, ret_y );
 657
 658      D_MAGIC_ASSERT( stack, CoreWindowStack );
 659      D_ASSUME( ret_x != NULL || ret_y != NULL );
 660
 661      /* Lock the window stack. */
 662      if (dfb_windowstack_lock( stack ))
 663           return DFB_FUSION;
 664
 665      if (ret_x)
 666           *ret_x = stack->cursor.x;
 667
 668      if (ret_y)
 669           *ret_y = stack->cursor.y;
 670
 671      /* Unlock the window stack. */
 672      dfb_windowstack_unlock( stack );
 673
 674      return DFB_OK;
 675 }

And this is the only commit (2006) that I see involving cursor handling:

http://git.directfb.org/?p=core/DirectFB.git;a=commit;h=10c3e898329f470e7c35e05783bab5f335514c3b

g-reno avatar Jun 08 '11 19:06 g-reno

Here is an archive link to the directfb posting: http://permalink.gmane.org/gmane.comp.graphics.directfb.user/2651

.

g-reno avatar Jun 08 '11 19:06 g-reno

Steps to duplicate:

install directfb and a vncviewer using your packager

# clone and build freerdp as usual

    mkdir <temporary build directory>
    cd to <temporary build directory>
    git clone https://github.com/FreeRDP/FreeRDP.git
    cd FreeRDP
    sh autogen.sh
    ./configure --with-dfb --with-x=no  --with-xkbfile=no 
    --with-debug=no
    make
    su -c "make install"


# create a ~/.directfbrc file with this content:

    depth=32
    system=X11
    mode=1024x768
    autoflip-window
    force-windowed
    # might need this, I did:
    # pixelformat=RGB24


# run

    dfb/dfbfreerdp -a 16 --gdi sw  SERVER


# in another terminal:

    vncviewer :0

g-reno avatar Jun 09 '11 23:06 g-reno