shell: Drop XDND initialization code

Let mutter take over this, and drop this piece of backend-specific
code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/611
This commit is contained in:
Carlos Garnacho 2019-07-03 16:28:00 +02:00
parent 915415d919
commit 8a22092632
3 changed files with 1 additions and 40 deletions

View File

@ -17,9 +17,6 @@ var XdndHandler = class {
Main.uiGroup.add_actor(this._dummy);
this._dummy.hide();
if (!Meta.is_wayland_compositor())
global.init_xdnd();
var dnd = Meta.get_backend().get_dnd();
dnd.connect('dnd-enter', this._onEnter.bind(this));
dnd.connect('dnd-position-change', this._onPositionChanged.bind(this));

View File

@ -51,7 +51,6 @@ struct _ShellGlobal {
GObject parent;
ClutterStage *stage;
Window stage_xwindow;
MetaDisplay *meta_display;
MetaWorkspaceManager *workspace_manager;
@ -852,15 +851,10 @@ _shell_global_set_plugin (ShellGlobal *global,
global->stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
if (meta_is_wayland_compositor ())
{
global->stage_xwindow = None;
}
else
if (!meta_is_wayland_compositor ())
{
MetaX11Display *x11_display = meta_display_get_x11_display (display);
global->xdisplay = meta_x11_display_get_xdisplay (x11_display);
global->stage_xwindow = clutter_x11_get_stage_window (global->stage);
}
st_entry_set_cursor_func (entry_cursor_func, global);
@ -1184,34 +1178,6 @@ shell_global_notify_error (ShellGlobal *global,
g_signal_emit_by_name (global, "notify-error", msg, details);
}
/**
* shell_global_init_xdnd:
* @global: the #ShellGlobal
*
* Enables tracking of Xdnd events
*/
void shell_global_init_xdnd (ShellGlobal *global)
{
Window output_window = meta_get_overlay_window (global->meta_display);
long xdnd_version = 5;
XChangeProperty (global->xdisplay, global->stage_xwindow,
gdk_x11_get_xatom_by_name ("XdndAware"), XA_ATOM,
32, PropModeReplace, (const unsigned char *)&xdnd_version, 1);
XChangeProperty (global->xdisplay, output_window,
gdk_x11_get_xatom_by_name ("XdndProxy"), XA_WINDOW,
32, PropModeReplace, (const unsigned char *)&global->stage_xwindow, 1);
/*
* XdndProxy is additionally set on the proxy window as verification that the
* XdndProxy property on the target window isn't a left-over
*/
XChangeProperty (global->xdisplay, global->stage_xwindow,
gdk_x11_get_xatom_by_name ("XdndProxy"), XA_WINDOW,
32, PropModeReplace, (const unsigned char *)&global->stage_xwindow, 1);
}
/**
* shell_global_get_pointer:
* @global: the #ShellGlobal

View File

@ -75,8 +75,6 @@ void shell_global_notify_error (ShellGlobal *global,
const char *msg,
const char *details);
void shell_global_init_xdnd (ShellGlobal *global);
void shell_global_reexec_self (ShellGlobal *global);
const char * shell_global_get_session_mode (ShellGlobal *global);