Blame xmms-1.2.10-reposition.patch
|
Paul F. Johnson |
61d0ec3 |
--- xmms-1.2.10/xmms/dock.c.bak 2001-03-08 07:48:38.000000000 +0200
|
|
Paul F. Johnson |
61d0ec3 |
+++ xmms-1.2.10/xmms/dock.c 2007-01-12 22:32:36.156705327 +0200
|
|
Paul F. Johnson |
61d0ec3 |
@@ -625,6 +625,17 @@
|
|
Paul F. Johnson |
61d0ec3 |
|
|
Paul F. Johnson |
61d0ec3 |
void dock_set_uposition(GtkWidget *w, gint x, gint y)
|
|
Paul F. Johnson |
61d0ec3 |
{
|
|
Paul F. Johnson |
61d0ec3 |
+ gint maxx, maxy;
|
|
Paul F. Johnson |
61d0ec3 |
+
|
|
Paul F. Johnson |
61d0ec3 |
+ maxx = gdk_screen_width();
|
|
Paul F. Johnson |
61d0ec3 |
+ maxy = gdk_screen_height();
|
|
Paul F. Johnson |
61d0ec3 |
+ if ((maxx < (x + 15)) || (maxy < (y + 15))) {
|
|
Paul F. Johnson |
61d0ec3 |
+ x = maxx / 2;
|
|
Paul F. Johnson |
61d0ec3 |
+ y = maxy / 2;
|
|
Paul F. Johnson |
61d0ec3 |
+ g_warning("%s: current screen size %dx%d smaller than "
|
|
Paul F. Johnson |
61d0ec3 |
+ "window position specified in config file, resetting to "
|
|
Paul F. Johnson |
61d0ec3 |
+ "x=%d y=%d\n", __FUNCTION__, maxx, maxy, x, y);
|
|
Paul F. Johnson |
61d0ec3 |
+ }
|
|
Paul F. Johnson |
61d0ec3 |
gtk_widget_set_uposition(w, x, y);
|
|
Paul F. Johnson |
61d0ec3 |
gtk_object_set_data(GTK_OBJECT(w), "window_x", GINT_TO_POINTER(x));
|
|
Paul F. Johnson |
61d0ec3 |
gtk_object_set_data(GTK_OBJECT(w), "window_y", GINT_TO_POINTER(y));
|