[Xfce4-commits] <orage:master> 4.5.7.20: minor fixes to hide show functionality for both Orage and Globatime
Juha Kautto
noreply at xfce.org
Sun Mar 14 13:42:02 CET 2010
Updating branch refs/heads/master
to e36ba8cccc3aad3c48c611afb9901a50f4f0d5ed (commit)
from c0abe1fc0905135fea21678586ae4788c2f472d2 (commit)
commit e36ba8cccc3aad3c48c611afb9901a50f4f0d5ed
Author: Juha Kautto <juha at xfce.org>
Date: Sun Mar 14 14:40:28 2010 +0200
4.5.7.20: minor fixes to hide show functionality for both Orage and Globatime
Fixed some special cases where windows were not visible as expected.
configure.in.in | 2 +-
globaltime/globaltime.c | 9 ++++-----
src/main.c | 15 ++++++++-------
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index 20af4ca..e6b6d00 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -9,7 +9,7 @@ dnl Written for Xfce by Juha Kautto <juha at xfce.org>
dnl
dnl Version information
-m4_define([orage_version], [4.7.5.19-git])
+m4_define([orage_version], [4.7.5.20-git])
m4_define([gtk_minimum_version], [2.10.0])
m4_define([xfce_minimum_version], [4.6.0])
diff --git a/globaltime/globaltime.c b/globaltime/globaltime.c
index 1c5377a..e731185 100644
--- a/globaltime/globaltime.c
+++ b/globaltime/globaltime.c
@@ -106,7 +106,7 @@ static gboolean global_time_active_already(GdkAtom *atom)
return(FALSE);
}
-static void show_globaltime()
+static void raise_window()
{
GdkWindow *window;
@@ -116,6 +116,7 @@ static void show_globaltime()
window = GTK_WIDGET(clocks.window)->window;
gdk_x11_window_set_user_time(window, gdk_x11_get_server_time(window));
gtk_widget_show(clocks.window);
+ gtk_window_present(GTK_WINDOW(clocks.window));
}
static gboolean client_message_received(GtkWidget *widget
@@ -123,9 +124,7 @@ static gboolean client_message_received(GtkWidget *widget
{
if (event->message_type ==
gdk_atom_intern("_XFCE_GLOBALTIME_RAISE", FALSE)) {
- /* we need to hide it first since minimized windows are visible ! */
- gtk_widget_hide(clocks.window);
- show_globaltime();
+ raise_window();
return(TRUE);
}
else if (event->message_type ==
@@ -134,7 +133,7 @@ static gboolean client_message_received(GtkWidget *widget
gtk_widget_hide(clocks.window);
return(TRUE);
}
- show_globaltime();
+ raise_window();
return(TRUE);
}
diff --git a/src/main.c b/src/main.c
index 2ca50dd..c7cb46b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -107,9 +107,9 @@ static void raise_window()
/*
screen = xfce_gdk_display_locate_monitor_with_pointer(NULL, NULL);
- */
gtk_window_set_screen(GTK_WINDOW(cal->mWindow)
, screen ? screen : gdk_screen_get_default());
+ */
if (g_par.pos_x || g_par.pos_y)
gtk_window_move(GTK_WINDOW(cal->mWindow)
, g_par.pos_x, g_par.pos_y);
@@ -121,6 +121,7 @@ static void raise_window()
, g_par.set_ontop);
window = GTK_WIDGET(cal->mWindow)->window;
gdk_x11_window_set_user_time(window, gdk_x11_get_server_time(window));
+ gtk_widget_show(cal->mWindow);
gtk_window_present(GTK_WINDOW(cal->mWindow));
}
@@ -132,27 +133,27 @@ static gboolean client_message_received(GtkWidget *widget
if (event->message_type ==
gdk_atom_intern("_XFCE_CALENDAR_RAISE", FALSE)) {
raise_window();
- return TRUE;
+ return(TRUE);
}
else if (event->message_type ==
gdk_atom_intern("_XFCE_CALENDAR_TOGGLE_HERE", FALSE)) {
if (GTK_WIDGET_VISIBLE(cal->mWindow)) {
write_parameters();
gtk_widget_hide(cal->mWindow);
- return TRUE;
+ return(TRUE);
}
else {
raise_window();
- return TRUE;
+ return(TRUE);
}
}
else if (event->message_type ==
gdk_atom_intern("_XFCE_CALENDAR_PREFERENCES", FALSE)) {
show_parameters();
- return TRUE;
+ return(TRUE);
}
- return FALSE;
+ return(FALSE);
}
gboolean keep_tidy(void)
@@ -162,7 +163,7 @@ gboolean keep_tidy(void)
calendar file smaller and faster */
xfical_archive();
#endif
- return TRUE;
+ return(TRUE);
}
/*
More information about the Xfce4-commits
mailing list