summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 05da63f)
raw | patch | inline | side by side (parent: 05da63f)
author | EricDWertz <EricDWertz@gmail.com> | |
Thu, 14 Jul 2016 02:46:51 +0000 (22:46 -0400) | ||
committer | EricDWertz <EricDWertz@gmail.com> | |
Thu, 14 Jul 2016 02:46:51 +0000 (22:46 -0400) |
.eric_window.h.swp | [deleted file] | patch | blob | history |
.main.c.swp | patch | blob | history | |
ericwindow-test | patch | blob | history | |
main.c | patch | blob | history |
diff --git a/.eric_window.h.swp b/.eric_window.h.swp
deleted file mode 100644 (file)
index 01c892b..0000000
Binary files a/.eric_window.h.swp and /dev/null differ
index 01c892b..0000000
Binary files a/.eric_window.h.swp and /dev/null differ
diff --git a/.main.c.swp b/.main.c.swp
index cfe3f959c68e9b8cea3b4c2548ee8d407097c9c5..a4c15ba84b9b4e9e835327274f9f6018d00d2c8f 100644 (file)
Binary files a/.main.c.swp and b/.main.c.swp differ
Binary files a/.main.c.swp and b/.main.c.swp differ
diff --git a/ericwindow-test b/ericwindow-test
index 183d176144ae986dd94fafa57e8104ca453db829..0d67b54b7ba0d541c1edb74c085ebba129f0638a 100755 (executable)
Binary files a/ericwindow-test and b/ericwindow-test differ
Binary files a/ericwindow-test and b/ericwindow-test differ
index 016342bcef7c8962a9eb535e05b066a3698c0e13..3dab4513c360cfd7aac5f1212139752ad2d01167 100644 (file)
--- a/main.c
+++ b/main.c
@@ -19,16 +19,25 @@ GdkFilterReturn handle_x11_event( GdkXEvent *xevent, GdkEvent *event, gpointer d
int main( int argc, char* argv[] )
{
+ int i;
+
gtk_init( &argc, &argv );
- eric_window* w = eric_window_create( 640, 480, "" );
+ eric_window* w = eric_window_create( 1920, 40, "" );
+ gtk_window_move( GTK_WINDOW( w->window ), 0, 1040 );
gtk_window_set_type_hint( GTK_WINDOW( w->window ), GDK_WINDOW_TYPE_HINT_DOCK );
gtk_widget_show_all( w->window );
Display* dpy = GDK_DISPLAY_XDISPLAY( gdk_display_get_default() );
Window xwin = RootWindow( dpy, DefaultScreen( dpy ) );
- XGrabKey( dpy, AnyKey, ControlMask, xwin, True, GrabModeAsync, GrabModeAsync );
+
+ //Grab number keys
+ for( i = 10; i <= 20; i++ )
+ {
+ XGrabKey( dpy, i, Mod4Mask | Mod2Mask, xwin, True, GrabModeAsync, GrabModeAsync );
+ XGrabKey( dpy, i, Mod4Mask, xwin, True, GrabModeAsync, GrabModeAsync );
+ }
gdk_window_add_filter( NULL, handle_x11_event, NULL );