mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
device-map: Add grab/ungrab_touch() methods
These functions deal with passive touch grabs, where available
This commit is contained in:
parent
83096642f0
commit
d115c90ed1
@ -76,6 +76,10 @@ struct _MetaDeviceMapClass
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers);
|
||||
void (* grab_touch) (MetaDeviceMap *pointer,
|
||||
Window xwindow);
|
||||
void (* ungrab_touch) (MetaDeviceMap *pointer,
|
||||
Window xwindow);
|
||||
};
|
||||
|
||||
GType meta_device_map_get_type (void) G_GNUC_CONST;
|
||||
@ -108,4 +112,9 @@ void meta_device_map_ungrab_button (MetaDeviceMap *device_map,
|
||||
guint n_button,
|
||||
guint modifiers);
|
||||
|
||||
void meta_device_map_grab_touch (MetaDeviceMap *device_map,
|
||||
Window xwindow);
|
||||
void meta_device_map_ungrab_touch (MetaDeviceMap *device_map,
|
||||
Window xwindow);
|
||||
|
||||
#endif /* META_DEVICE_MAP_PRIVATE_H */
|
||||
|
@ -397,3 +397,33 @@ meta_device_map_ungrab_button (MetaDeviceMap *device_map,
|
||||
if (klass->ungrab_button)
|
||||
(klass->ungrab_button) (device_map, xwindow, n_button, modifiers);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_map_grab_touch (MetaDeviceMap *device_map,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaDeviceMapClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE_MAP (device_map));
|
||||
g_return_if_fail (xwindow != None);
|
||||
|
||||
klass = META_DEVICE_MAP_GET_CLASS (device_map);
|
||||
|
||||
if (klass->grab_touch)
|
||||
(klass->grab_touch) (device_map, xwindow);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_map_ungrab_touch (MetaDeviceMap *device_map,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaDeviceMapClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE_MAP (device_map));
|
||||
g_return_if_fail (xwindow != None);
|
||||
|
||||
klass = META_DEVICE_MAP_GET_CLASS (device_map);
|
||||
|
||||
if (klass->ungrab_touch)
|
||||
(klass->ungrab_touch) (device_map, xwindow);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user