[PATCH] Export include/input.h:GetMaster() function

Peter Hutterer peter.hutterer at who-t.net
Wed Oct 12 22:29:46 PDT 2011


On Wed, Oct 12, 2011 at 12:44:00PM +0200, Adam Tkac wrote:
> On 10/12/2011 06:27 AM, Peter Hutterer wrote:
> >On Tue, Oct 11, 2011 at 03:12:56PM +0200, Adam Tkac wrote:
> >>attached patch exports the GetMaster() function, it is needed by
> >>TigerVNC's libvnc.so module. Please merge it also to 1.11 release, thank
> >>you!
> >where/how do you need this? afaict this function hasn't been exported since
> >it was added (pre-1.6) so I guess something must have changed that this is
> >needed now.
> >
> >I'm not a big fan of exporting random functions without knowing why,
> >especially given how much of a mess our ABI already is.
> >
> >Cheers,
> >   Peter
> 
> Previously, we simply got master from slave->u.master. I though it
> is more appropriate to use GetMaster(), this is the reason why it
> wasn't needed before. If you don't like to export GetMaster() (well,
> I don't think this function will change it's parameters in the
> future), I will use the former slave->u.master approach. Please let
> me know your decision.

again, what do you need it for? git grep GetMaster() hw/ shows only two uses
in the Xorg DDX. One is to get the right state for the protocol (DGA) and
one is to prevent hardware-cursor rendering in an MPX setup. I wonder what
VNC needs to know the hierarchy for.

Cheers,
  Peter

> >
> >>Comments are welcomed.
> >>
> >>Regards, Adam
> >> From 1cf3957095fdfae8ca3382c48e502d30df8ffeff Mon Sep 17 00:00:00 2001
> >>From: Adam Tkac<atkac at redhat.com>
> >>Date: Tue, 11 Oct 2011 14:21:27 +0200
> >>Subject: [PATCH] Mark GetMaster as _X_EXPORT.
> >>
> >>The include/input.h:GetMaster() it is needed by TigerVNC's libvnc.so module.
> >>
> >>Signed-off-by: Adam Tkac<atkac at redhat.com>
> >>---
> >>  include/input.h |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >>diff --git a/include/input.h b/include/input.h
> >>index 6ba1ab2..7c117b6 100644
> >>--- a/include/input.h
> >>+++ b/include/input.h
> >>@@ -501,7 +501,7 @@ extern int AttachDevice(ClientPtr client,
> >>                          DeviceIntPtr master);
> >>
> >>  extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
> >>-extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
> >>+extern _X_EXPORT DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
> >>
> >>  extern _X_EXPORT int AllocDevicePair(ClientPtr client,
> >>                               char* name,
> >>-- 
> >>1.7.6.4
> >>
> 


More information about the xorg-devel mailing list