aboutsummaryrefslogtreecommitdiffhomepage
path: root/callbacks.c
diff options
context:
space:
mode:
authorGravatar Rob <rob.manea@gmail.com>2009-11-05 15:09:39 +0100
committerGravatar Rob <rob.manea@gmail.com>2009-11-05 15:09:39 +0100
commit1461ac760f79b8f153c8317c4534cb047a48331a (patch)
tree9daeea64f3dc5bea89d834468d7b53f8b9b06b1b /callbacks.c
parentcdb1cca83e0fb3598a3822282ff463a305d1113c (diff)
fix geometry settings
Diffstat (limited to 'callbacks.c')
-rw-r--r--callbacks.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/callbacks.c b/callbacks.c
index 704414f..c2b1455 100644
--- a/callbacks.c
+++ b/callbacks.c
@@ -38,10 +38,15 @@ set_icon() {
void
cmd_set_geometry() {
- if(!gtk_window_parse_geometry(GTK_WINDOW(uzbl.gui.main_window), uzbl.gui.geometry)) {
- if(uzbl.state.verbose)
- printf("Error in geometry string: %s\n", uzbl.gui.geometry);
- }
+ int ret=0, x=0, y=0;
+ unsigned int w=0, h=0;
+
+ ret = XParseGeometry(uzbl.gui.geometry, &x, &y, &w, &h);
+ if(ret & XValue)
+ gtk_window_move((GtkWindow *)uzbl.gui.main_window, x, y);
+ if(ret & WidthValue)
+ gtk_window_resize((GtkWindow *)uzbl.gui.main_window, w, h);
+
/* update geometry var with the actual geometry
this is necessary as some WMs don't seem to honour
the above setting and we don't want to end up with