Bug 1257067 - modified XF86XK_ keysyms to GDK_ ones r?masayuki
MozReview-Commit-ID: 1UvswTZ2B6p
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -41,22 +41,16 @@
#include <gdk/gdkx.h>
#include <X11/Xatom.h>
#include <X11/extensions/XShm.h>
#include <X11/extensions/shape.h>
#if (MOZ_WIDGET_GTK == 3)
#include <gdk/gdkkeysyms-compat.h>
#endif
-#ifdef AIX
-#include <X11/keysym.h>
-#else
-#include <X11/XF86keysym.h>
-#endif
-
#if (MOZ_WIDGET_GTK == 2)
#include "gtk2xtbin.h"
#endif
#endif /* MOZ_X11 */
#include <gdk/gdkkeysyms.h>
#if (MOZ_WIDGET_GTK == 2)
#include <gtk/gtkprivate.h>
#endif
@@ -3070,51 +3064,47 @@ nsWindow::OnKeyPressEvent(GdkEventKey *a
if (!IMEWasEnabled && mIMContext && mIMContext->IsEnabled()) {
// Notice our keydown event was already dispatched. This prevents
// unnecessary DOM keydown event in the editor.
if (mIMContext->OnKeyEvent(this, aEvent, true)) {
return TRUE;
}
}
-#ifdef MOZ_X11
-#if ! defined AIX // no XFree86 on AIX 5L
// Look for specialized app-command keys
switch (aEvent->keyval) {
- case XF86XK_Back:
+ case GDK_Back:
return DispatchCommandEvent(nsGkAtoms::Back);
- case XF86XK_Forward:
+ case GDK_Forward:
return DispatchCommandEvent(nsGkAtoms::Forward);
- case XF86XK_Refresh:
+ case GDK_Refresh:
return DispatchCommandEvent(nsGkAtoms::Reload);
- case XF86XK_Stop:
+ case GDK_Stop:
return DispatchCommandEvent(nsGkAtoms::Stop);
- case XF86XK_Search:
+ case GDK_Search:
return DispatchCommandEvent(nsGkAtoms::Search);
- case XF86XK_Favorites:
+ case GDK_Favorites:
return DispatchCommandEvent(nsGkAtoms::Bookmarks);
- case XF86XK_HomePage:
+ case GDK_HomePage:
return DispatchCommandEvent(nsGkAtoms::Home);
- case XF86XK_Copy:
+ case GDK_Copy:
case GDK_F16: // F16, F20, F18, F14 are old keysyms for Copy Cut Paste Undo
return DispatchContentCommandEvent(eContentCommandCopy);
- case XF86XK_Cut:
+ case GDK_Cut:
case GDK_F20:
return DispatchContentCommandEvent(eContentCommandCut);
- case XF86XK_Paste:
+ case GDK_Paste:
case GDK_F18:
return DispatchContentCommandEvent(eContentCommandPaste);
case GDK_Redo:
return DispatchContentCommandEvent(eContentCommandRedo);
case GDK_Undo:
case GDK_F14:
return DispatchContentCommandEvent(eContentCommandUndo);
}
-#endif /* ! AIX */
-#endif /* MOZ_X11 */
WidgetKeyboardEvent keypressEvent(true, eKeyPress, this);
KeymapWrapper::InitKeyEvent(keypressEvent, aEvent);
// before we dispatch a key, check if it's the context menu key.
// If so, send a context menu key event instead.
if (is_context_menu_key(keypressEvent)) {
WidgetMouseEvent contextMenuEvent(true, eContextMenu, this,