Not logged inOpenClonk Forum
Up Topic Multi pointer X (MPX) for multiplaying on same computer

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to aapo
Ok. I attached patch to bug tracker for previews, comments and corrections. Currently it will not add any value for end-users (instead it introduces couple of misfeatures).
http://bugs.openclonk.org/view.php?id=543

There are some fuzzy with naming:
event VS message
MPX VS Xi2

General design idea:
configure time: check Xi -library
compile time: #ifdef USE_MPX
run time: if X supports MPX

Missing/TODO (=current status)
*configure fails if Xi is missing (shoud be conditional/optional, but I do not know how to do it)

Status:
SdtXWindow.cpp:
*Check MPX support
*adds event listeners for MPX-events.

StdXApp.cpp:
*Handle MPXMessages and pass them to C4FullScreen.cpp (like regular events)

C4FullScreen.cpp
*Reacts to MPX-events (like regular events)
*Prints which pointer (ID) is used, BUT doesn't send it to forward!

Start game with one/two/three mice: There are only one cursor.
Clicking and moving will tell what mouse is used.

Moving cursor works. Single click (left/right) works. Double clicking works.
Moving Clonk with keyboard works.
Writing on chat-messages or changing team name (etc) works only with ASCII. Also shift+ctrl+alt are not working with dialogs.
(because there was too many Xutf8LookupString/XLookupString... I do not yet know how to use them with MPX-events)

*I have tested code without #define USE_MPX
(config.h:177)

*I have tested code with #define USE_MPX + faking that X-server doesn't have support for it.
(StdXWindow.cpp:194)

-> Then regular X-events are used.

Some questions:
1)
StdXApp.cpp has several
CStdWindow * pWindow = Priv->GetWindow(event.xany.window);
and pWindow
Are some of these 'global' (from StdWindow.h) and some local?
Now MPX-event handler uses only local-variable CStdWindow * pWindow = Priv->GetWindow(evData->event);

2)
Are copy-pasting-events used in game: SelectionClear, SelectionRequest, SelectionNotify?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill