Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 835710 Details for
Bug 844555
RFE: new IME switcher prevents to send the key events to kvm
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
test case with gdk
a2.c (text/plain), 1.48 KB, created by
fujiwara
on 2013-12-12 10:01:45 UTC
(
hide
)
Description:
test case with gdk
Filename:
MIME Type:
Creator:
fujiwara
Created:
2013-12-12 10:01:45 UTC
Size:
1.48 KB
patch
obsolete
>#include <gdk/gdk.h> >#include <gdk/gdkx.h> >#include <extensions/XInput2.h> >#include <extensions/XI2.h> >#include <Xlib.h> >#include <X.h> >#include <stdio.h> >#include <stdlib.h> > >static void >event_handler (GdkEvent *event, gpointer data) >{ > if (event->type != GDK_KEY_PRESS) > return; > > if (event->key.keyval == 0x20) > printf ("event handled\n"); >} > >int >main (int argc, char *argv[]) >{ > KeySym keysym = 0x20; > KeyCode keycode; > XIGrabModifiers modifiers[] = { ControlMask }; > int mask_len = (XI_LASTEVENT + 7) / 8; > unsigned char *mask = calloc (mask_len, sizeof (unsigned char)); > XIEventMask evmask = { XIAllMasterDevices, mask_len, mask }; > GdkDisplay *display; > Display *xdisplay; > Window grab_window; > > gtk_init (&argc, &argv); > > display = gdk_display_get_default (); > xdisplay = GDK_DISPLAY_XDISPLAY (display); > grab_window = XDefaultRootWindow (xdisplay); > > keycode = XKeysymToKeycode (xdisplay, keysym); > > printf ("keysym: %x keycode: %x modifiers: %d\n", > keysym, keycode, modifiers[0]); > > XISetMask (evmask.mask, XI_KeyPress); > > XIGrabKeycode (xdisplay, > XIAllMasterDevices, > keycode, > grab_window, > XIGrabModeAsync, > XIGrabModeAsync, > True, > &evmask, > 1, > modifiers); > > gdk_event_handler_set (event_handler, NULL, NULL); > > gtk_main (); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 844555
:
835694
| 835710