fix multimedia window appearing in a different position when shown for the
2007-03-18 Jens Granseuer <jensgr@gmx.net> * gnome-settings-multimedia-keys.c: (dialog_show): fix multimedia window appearing in a different position when shown for the first time and thus causing a "jump" effect on the second (fixes bug #400915) svn path=/trunk/; revision=7387
This commit is contained in:
parent
2aae323992
commit
711d022d03
2 changed files with 20 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-03-18 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* gnome-settings-multimedia-keys.c: (dialog_show): fix multimedia
|
||||||
|
window appearing in a different position when shown for the first time
|
||||||
|
and thus causing a "jump" effect on the second (fixes bug #400915)
|
||||||
|
|
||||||
2007-02-28 Jens Granseuer <jensgr@gmx.net>
|
2007-02-28 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* actions/acme-volume-gstreamer.c: (acme_volume_gstreamer_open): ref
|
* actions/acme-volume-gstreamer.c: (acme_volume_gstreamer_open): ref
|
||||||
|
|
|
@ -339,20 +339,29 @@ init_kbd (Acme *acme)
|
||||||
static void
|
static void
|
||||||
dialog_show (Acme *acme)
|
dialog_show (Acme *acme)
|
||||||
{
|
{
|
||||||
int orig_x, orig_y, orig_w, orig_h, orig_d;
|
int orig_w, orig_h;
|
||||||
int screen_w, screen_h;
|
int screen_w, screen_h;
|
||||||
int x, y;
|
int x, y;
|
||||||
int pointer_x, pointer_y;
|
int pointer_x, pointer_y;
|
||||||
|
GtkRequisition win_req;
|
||||||
GdkScreen *pointer_screen;
|
GdkScreen *pointer_screen;
|
||||||
GdkRectangle geometry;
|
GdkRectangle geometry;
|
||||||
int monitor;
|
int monitor;
|
||||||
|
|
||||||
gtk_window_set_screen (GTK_WINDOW (acme->dialog), acme->current_screen);
|
gtk_window_set_screen (GTK_WINDOW (acme->dialog), acme->current_screen);
|
||||||
gtk_widget_realize (GTK_WIDGET (acme->dialog));
|
|
||||||
|
|
||||||
gdk_window_get_geometry (GTK_WIDGET (acme->dialog)->window,
|
/*
|
||||||
&orig_x, &orig_y,
|
* get the window size
|
||||||
&orig_w, &orig_h, &orig_d);
|
* if the window hasn't been mapped, it doesn't necessarily
|
||||||
|
* know its true size, yet, so we need to jump through hoops
|
||||||
|
*/
|
||||||
|
gtk_window_get_default_size (GTK_WINDOW (acme->dialog), &orig_w, &orig_h);
|
||||||
|
gtk_widget_size_request (acme->dialog, &win_req);
|
||||||
|
|
||||||
|
if (win_req.width > orig_w)
|
||||||
|
orig_w = win_req.width;
|
||||||
|
if (win_req.height > orig_h)
|
||||||
|
orig_h = win_req.height;
|
||||||
|
|
||||||
pointer_screen = NULL;
|
pointer_screen = NULL;
|
||||||
gdk_display_get_pointer (gdk_screen_get_display (acme->current_screen),
|
gdk_display_get_pointer (gdk_screen_get_display (acme->current_screen),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue