xdnd: Rename XDnD handling signals to more inclusive ones

Rename the signals which have been used to handle XDnd events to more inclusive
ones. So that these signals can be used to handle the DnD events in Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=765003
This commit is contained in:
Hyungwon Hwang 2016-12-21 22:22:47 +09:00 committed by Jonas Ådahl
parent 18aa4ff30c
commit 46f3712421
2 changed files with 9 additions and 9 deletions

View File

@ -24,9 +24,9 @@ const XdndHandler = new Lang.Class({
if (!Meta.is_wayland_compositor())
global.init_xdnd();
global.connect('xdnd-enter', Lang.bind(this, this._onEnter));
global.connect('xdnd-position-changed', Lang.bind(this, this._onPositionChanged));
global.connect('xdnd-leave', Lang.bind(this, this._onLeave));
global.connect('dnd-enter', Lang.bind(this, this._onEnter));
global.connect('dnd-position-change', Lang.bind(this, this._onPositionChanged));
global.connect('dnd-leave', Lang.bind(this, this._onLeave));
this._windowGroupVisibilityHandlerId = 0;
},

View File

@ -360,7 +360,7 @@ shell_global_class_init (ShellGlobalClass *klass)
/* Emitted from gnome-shell-plugin.c during event handling */
shell_global_signals[XDND_POSITION_CHANGED] =
g_signal_new ("xdnd-position-changed",
g_signal_new ("dnd-position-change",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
@ -369,7 +369,7 @@ shell_global_class_init (ShellGlobalClass *klass)
/* Emitted from gnome-shell-plugin.c during event handling */
shell_global_signals[XDND_LEAVE] =
g_signal_new ("xdnd-leave",
g_signal_new ("dnd-leave",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
@ -378,7 +378,7 @@ shell_global_class_init (ShellGlobalClass *klass)
/* Emitted from gnome-shell-plugin.c during event handling */
shell_global_signals[XDND_ENTER] =
g_signal_new ("xdnd-enter",
g_signal_new ("dnd-enter",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
@ -1962,7 +1962,7 @@ gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
/* Store the timestamp of the xdnd position event */
global->xdnd_timestamp = xev->xclient.data.l[3];
g_signal_emit_by_name (G_OBJECT (global), "xdnd-position-changed",
g_signal_emit_by_name (G_OBJECT (global), "dnd-position-change",
(int)(xev->xclient.data.l[2] >> 16), (int)(xev->xclient.data.l[2] & 0xFFFF));
global->xdnd_timestamp = 0;
@ -1970,13 +1970,13 @@ gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
}
else if (xev->xany.type == ClientMessage && xev->xclient.message_type == gdk_x11_get_xatom_by_name ("XdndLeave"))
{
g_signal_emit_by_name (G_OBJECT (global), "xdnd-leave");
g_signal_emit_by_name (G_OBJECT (global), "dnd-leave");
return TRUE;
}
else if (xev->xany.type == ClientMessage && xev->xclient.message_type == gdk_x11_get_xatom_by_name ("XdndEnter"))
{
g_signal_emit_by_name (G_OBJECT (global), "xdnd-enter");
g_signal_emit_by_name (G_OBJECT (global), "dnd-enter");
return TRUE;
}