forked from AuroraMiddleware/gtk
xim: Stop using ::configure-event
The generic ::event will do.
This commit is contained in:
parent
cbf1ff98f7
commit
2e04817701
@ -1631,33 +1631,34 @@ on_status_toplevel_notify_display (GtkWindow *toplevel,
|
|||||||
* the status window to follow it.
|
* the status window to follow it.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
on_status_toplevel_configure (GtkWidget *toplevel,
|
on_status_toplevel_configure (GtkWidget *toplevel,
|
||||||
GdkEventConfigure *event,
|
GdkEvent *event,
|
||||||
StatusWindow *status_window)
|
StatusWindow *status_window)
|
||||||
{
|
{
|
||||||
GdkRectangle rect;
|
if (gdk_event_get_event_type (event) == GDK_CONFIGURE)
|
||||||
GtkRequisition requisition;
|
|
||||||
gint y;
|
|
||||||
gint height;
|
|
||||||
|
|
||||||
if (status_window->window)
|
|
||||||
{
|
{
|
||||||
height = DisplayHeight(GDK_WINDOW_XDISPLAY (gtk_widget_get_window (toplevel)), 0);
|
GdkRectangle rect;
|
||||||
|
GtkRequisition requisition;
|
||||||
|
gint y;
|
||||||
|
gint height;
|
||||||
|
|
||||||
gdk_window_get_frame_extents (gtk_widget_get_window (toplevel),
|
if (status_window->window)
|
||||||
&rect);
|
{
|
||||||
gtk_widget_get_preferred_size ( (status_window->window),
|
height = DisplayHeight(GDK_WINDOW_XDISPLAY (gtk_widget_get_window (toplevel)), 0);
|
||||||
&requisition, NULL);
|
|
||||||
|
|
||||||
if (rect.y + rect.height + requisition.height < height)
|
gdk_window_get_frame_extents (gtk_widget_get_window (toplevel), &rect);
|
||||||
y = rect.y + rect.height;
|
gtk_widget_get_preferred_size ( (status_window->window), &requisition, NULL);
|
||||||
else
|
|
||||||
y = height - requisition.height;
|
if (rect.y + rect.height + requisition.height < height)
|
||||||
|
y = rect.y + rect.height;
|
||||||
gtk_window_move (GTK_WINDOW (status_window->window), rect.x, y);
|
else
|
||||||
|
y = height - requisition.height;
|
||||||
|
|
||||||
|
gtk_window_move (GTK_WINDOW (status_window->window), rect.x, y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return GDK_EVENT_PROPAGATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Frees a status window and removes its link from the status_windows list
|
/* Frees a status window and removes its link from the status_windows list
|
||||||
@ -1707,7 +1708,7 @@ status_window_get (GtkWidget *toplevel)
|
|||||||
g_signal_connect (toplevel, "destroy",
|
g_signal_connect (toplevel, "destroy",
|
||||||
G_CALLBACK (on_status_toplevel_destroy),
|
G_CALLBACK (on_status_toplevel_destroy),
|
||||||
status_window);
|
status_window);
|
||||||
g_signal_connect (toplevel, "configure-event",
|
g_signal_connect (toplevel, "event",
|
||||||
G_CALLBACK (on_status_toplevel_configure),
|
G_CALLBACK (on_status_toplevel_configure),
|
||||||
status_window);
|
status_window);
|
||||||
g_signal_connect (toplevel, "notify::display",
|
g_signal_connect (toplevel, "notify::display",
|
||||||
|
Loading…
Reference in New Issue
Block a user