Remote mouse move events
#1
Hello all,

I am writing a remote for XBMC in C++ running on Ubuntu 10.04 on the latest source code.
The xbmcclient.h code works well with various buttons that I tried, but the CPacketMOUSE sends the cursor to 0,0 (upper left corner) regardless of the X,Y parameters passed. I tried with and w/o a UID parameter.

Is any initialization required? Is there a bug in the library client code maybe?

Thanks,
Michael



Code:
CPacketHELO HeloPackage("Example Mouse", ICON_PNG, "../../icons/mouse.png");
  HeloPackage.Send(sockfd, my_addr, UID);

  sleep(5);

  for(int i = 0; i < 65536; i+=2000)
  {
    CPacketMOUSE mouse(i,i);
    mouse.Send(sockfd, my_addr, UID);
    sleep(1);
    printf("%d\n",i);
  }

  // BYE is not required since XBMC would have shut down
  CPacketBYE bye; // CPacketPing if you want to ping
  bye.Send(sockfd, my_addr, UID);
Reply
#2
bump. any help?
Reply
#3
I think I have found the issue.

xbmc/network/EventClient.cpp
CEventClient::GetMousePos() uses g_graphicsContext.GetViewWindow() which is only available while a video is playing, instead of g_Windowing.GetViewPort()

Should I commit the fix?
Reply
#4
Sure, commit the fix to your github and send a pull request. Make sure you clearly describe the problem and your chosen solution.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Remote mouse move events0