From: EricDWertz Date: Thu, 14 Jul 2016 02:46:51 +0000 (-0400) Subject: committing stuff X-Git-Url: https://ericdwertz.com/git/?a=commitdiff_plain;h=cb1200373e4747bb6168e2f1c6710b497d7b0bc4;p=ericdock.git committing stuff --- diff --git a/.eric_window.h.swp b/.eric_window.h.swp deleted file mode 100644 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 cfe3f95..a4c15ba 100644 Binary files a/.main.c.swp and b/.main.c.swp differ diff --git a/ericwindow-test b/ericwindow-test index 183d176..0d67b54 100755 Binary files a/ericwindow-test and b/ericwindow-test differ diff --git a/main.c b/main.c index 016342b..3dab451 100644 --- 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 );