mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
mutter_plugin_set_stage_input_region()
This commit is contained in:
parent
7bef175590
commit
e4501f801e
@ -895,6 +895,27 @@ mutter_plugin_set_stage_input_area (MutterPlugin *plugin,
|
||||
|
||||
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
|
||||
XFixesSetWindowShapeRegion (xdpy, xoverlay, ShapeInput, 0, 0, region);
|
||||
|
||||
XFixesDestroyRegion (xdpy, region);
|
||||
}
|
||||
|
||||
void
|
||||
mutter_plugin_set_stage_input_region (MutterPlugin *plugin,
|
||||
XserverRegion region)
|
||||
{
|
||||
MutterPluginPrivate *priv = plugin->manager_private;
|
||||
MutterPluginManager *mgr = priv->self;
|
||||
MetaDisplay *display = meta_screen_get_display (mgr->screen);
|
||||
Display *xdpy = meta_display_get_xdisplay (display);
|
||||
Window xstage, xoverlay;
|
||||
ClutterActor *stage;
|
||||
|
||||
stage = mutter_get_stage_for_screen (mgr->screen);
|
||||
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
||||
xoverlay = mutter_get_overlay_window (mgr->screen);
|
||||
|
||||
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
|
||||
XFixesSetWindowShapeRegion (xdpy, xoverlay, ShapeInput, 0, 0, region);
|
||||
}
|
||||
|
||||
GList *
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "compositor-mutter.h"
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
|
||||
/*
|
||||
* This file defines the plugin API.
|
||||
@ -243,6 +244,10 @@ void
|
||||
mutter_plugin_set_stage_input_area (MutterPlugin *plugin,
|
||||
gint x, gint y, gint width, gint height);
|
||||
|
||||
void
|
||||
mutter_plugin_set_stage_input_region (MutterPlugin *plugin,
|
||||
XserverRegion region);
|
||||
|
||||
GList *
|
||||
mutter_plugin_get_windows (MutterPlugin *plugin);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user