summaryrefslogtreecommitdiff
path: root/libslab
diff options
context:
space:
mode:
Diffstat (limited to 'libslab')
-rw-r--r--libslab/app-shell.c9
-rw-r--r--libslab/shell-window.c8
2 files changed, 5 insertions, 12 deletions
diff --git a/libslab/app-shell.c b/libslab/app-shell.c
index 2c7ec9fc..78e1b6a9 100644
--- a/libslab/app-shell.c
+++ b/libslab/app-shell.c
@@ -25,6 +25,7 @@
#include <libmate-desktop/mate-desktop-item.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -256,7 +257,6 @@ layout_shell (AppShellData * app_data, const gchar * filter_title, const gchar *
GtkWidget *left_vbox;
GtkWidget *right_vbox;
gint num_cols;
- gint sc_width;
GtkWidget *sw;
GtkAdjustment *adjustment;
@@ -266,13 +266,10 @@ layout_shell (AppShellData * app_data, const gchar * filter_title, const gchar *
right_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gdk_window_get_geometry (gdk_screen_get_root_window (gdk_screen_get_default()),
- NULL, NULL, &sc_width, NULL);
-
num_cols = SIZING_SCREEN_WIDTH_LARGE_NUMCOLS;
- if (sc_width <= SIZING_SCREEN_WIDTH_LARGE)
+ if (WidthOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ())) <= SIZING_SCREEN_WIDTH_LARGE)
{
- if (sc_width <= SIZING_SCREEN_WIDTH_MEDIUM)
+ if (WidthOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ())) <= SIZING_SCREEN_WIDTH_MEDIUM)
num_cols = SIZING_SCREEN_WIDTH_SMALL_NUMCOLS;
else
num_cols = SIZING_SCREEN_WIDTH_MEDIUM_NUMCOLS;
diff --git a/libslab/shell-window.c b/libslab/shell-window.c
index 0b6df1cb..2e97a22f 100644
--- a/libslab/shell-window.c
+++ b/libslab/shell-window.c
@@ -21,6 +21,7 @@
#include "shell-window.h"
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
#include "app-resizer.h"
@@ -113,13 +114,8 @@ shell_window_handle_size_request (GtkWidget * widget, GtkRequisition * requisiti
height = child_requisiton.height + 10;
if (height > requisition->height)
{
- gint sc_height;
-
- gdk_window_get_geometry (gdk_screen_get_root_window (gdk_screen_get_default()),
- NULL, NULL, NULL, &sc_height);
-
requisition->height =
- MIN (((gfloat) sc_height * SIZING_HEIGHT_PERCENT), height);
+ MIN (((gfloat) HeightOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ())) * SIZING_HEIGHT_PERCENT), height);
}
}