< prev index next >

modules/graphics/src/main/native-glass/gtk/glass_window_ime.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 24,34 **** */ #include "com_sun_glass_ui_View.h" #include "glass_window.h" #include "glass_general.h" - #include "glass_gtkcompat.h" #include <cstring> #include <cstdlib> bool WindowContextBase::hasIME() { --- 24,33 ----
*** 39,49 **** XKeyPressedEvent result; memset(&result, 0, sizeof (result)); result.type = (event->type == GDK_KEY_PRESS) ? KeyPress : KeyRelease; result.send_event = event->send_event; ! result.display = gdk_x11_display_get_xdisplay(glass_gdk_window_get_display(event->window)); result.window = result.subwindow = GDK_WINDOW_XID(event->window); result.root = GDK_WINDOW_XID(gdk_screen_get_root_window(glass_gdk_window_get_screen(event->window))); result.time = event->time; result.state = event->state; result.keycode = event->hardware_keycode; --- 38,48 ---- XKeyPressedEvent result; memset(&result, 0, sizeof (result)); result.type = (event->type == GDK_KEY_PRESS) ? KeyPress : KeyRelease; result.send_event = event->send_event; ! result.display = gdk_x11_display_get_xdisplay(gdk_window_get_display(event->window)); result.window = result.subwindow = GDK_WINDOW_XID(event->window); result.root = GDK_WINDOW_XID(gdk_screen_get_root_window(glass_gdk_window_get_screen(event->window))); result.time = event->time; result.state = event->state; result.keycode = event->hardware_keycode;
*** 220,230 **** return result; } void WindowContextBase::enableOrResetIME() { ! Display *display = gdk_x11_display_get_xdisplay(glass_gdk_window_get_display(gdk_window)); if (xim.im == NULL || xim.ic == NULL) { xim.im = XOpenIM(display, NULL, NULL, NULL); if (xim.im == NULL) { return; } --- 219,229 ---- return result; } void WindowContextBase::enableOrResetIME() { ! Display *display = gdk_x11_display_get_xdisplay(gdk_window_get_display(gdk_window)); if (xim.im == NULL || xim.ic == NULL) { xim.im = XOpenIM(display, NULL, NULL, NULL); if (xim.im == NULL) { return; }
< prev index next >