grim/guifications2

5e56343a7607
Parents dfbfeb1c13be
Children a65fa49017db
A bunch of gtk3 updates, need to figure out the transition to cairo though :-/
--- a/CMakeLists.txt Thu May 23 05:35:26 2013 -0500
+++ b/CMakeLists.txt Fri May 24 00:06:38 2013 -0500
@@ -18,7 +18,7 @@
find_package(PkgConfig)
pkg_check_modules(GLIB REQUIRED glib-2.0>=2.28.0)
-pkg_check_modules(GTK3 REQUIRED gtk+-3.0 gdk-3.0)
+pkg_check_modules(GTK3 REQUIRED gtk+-3.0 gdk-3.0 gdk-pixbuf-3.0)
pkg_check_modules(PURPLE REQUIRED purple-3)
pkg_check_modules(PIDGIN REQUIRED pidgin-3)
pkg_check_modules(CAIRO REQUIRED cairo)
--- a/src/gf_action.c Thu May 23 05:35:26 2013 -0500
+++ b/src/gf_action.c Fri May 24 00:06:38 2013 -0500
@@ -64,7 +64,7 @@
GfAction *
gf_action_new() {
GfAction *action;
-
+
action = g_new0(GfAction, 1);
return action;
@@ -447,7 +447,7 @@
scrheight = gdk_screen_get_height(gtk_widget_get_screen(GTK_WIDGET(menu)));
- gtk_widget_size_request(GTK_WIDGET(menu), &req);
+ gtk_widget_get_preferred_size(GTK_WIDGET(menu), NULL, &req);
if((*y + req.height > scrheight) && (scrheight - req.height > 0))
*y = scrheight - req.height;
--- a/src/gf_display.c Thu May 23 05:35:26 2013 -0500
+++ b/src/gf_display.c Fri May 24 00:06:38 2013 -0500
@@ -118,9 +118,14 @@
return TRUE;
} else if(e->type == GDK_BUTTON_RELEASE) {
GfAction *action = NULL;
+ GdkDeviceManager *manager = NULL;
+ GdkDevice *mouse = NULL;
const gchar *pref = NULL;
- gdk_window_get_pointer(w->window, &x, &y, NULL);
+ manager = gdk_display_get_device_manager(gdk_display_get_default());
+ mouse = gdk_device_manager_get_client_pointer(manager);
+ gdk_window_get_device_position(gtk_widget_get_window(w), mouse, &x, &y,
+ NULL);
if(x < 0 || x > display->width || y < 0 || y > display->height)
return FALSE;
@@ -616,7 +621,7 @@
/* update the display and force gdk to redraw it */
gf_display_shape(display);
gf_display_position(display);
- gdk_window_process_updates(GDK_WINDOW(display->window->window), TRUE);
+ gdk_window_process_updates(gtk_widget_get_window(display->window), TRUE);
/* Finish up */
if(display->state == GF_DISPLAY_STATE_SHOWING) {