Commit 5c8cb7d8 authored by Paolo Borelli's avatar Paolo Borelli Committed by Paolo Borelli

make sure window is realized before setting the startup timestamp.

2005-12-29  Paolo Borelli  <pborelli@katamail.com>

	* gedit/gedit.c: make sure window is realized before setting the
	startup timestamp.
parent c41f87a1
2005-12-29 Paolo Borelli <pborelli@katamail.com>
* gedit/gedit.c: make sure window is realized before setting the
startup timestamp.
2005-12-28 Steve Frécinaux <nudrema@gwash.com>
* plugins/indent/gedit-indent-plugin.c: retrieve tab settings
......
......@@ -283,19 +283,6 @@ on_message_received (const char *message,
window = _gedit_app_get_window_in_workspace (app, workspace);
}
/* set the proper interaction time on the window.
* fall back to roundtripping to the X server. lame. */
if (startup_timestamp <= 0)
{
if (!GTK_WIDGET_REALIZED (window))
gtk_widget_realize (GTK_WIDGET (window));
startup_timestamp = gdk_x11_get_server_time (GTK_WIDGET (window)->window);
}
gdk_x11_window_set_user_time (GTK_WIDGET (window)->window,
startup_timestamp);
if (file_list != NULL)
{
gedit_cmd_load_files_from_prompt (window,
......@@ -317,6 +304,21 @@ on_message_received (const char *message,
gedit_window_create_tab (window, TRUE);
}
/* set the proper interaction time on the window.
* Fall back to roundtripping to the X server when we
* don't have the timestamp, e.g. when launched from
* terminal. We also need to make sure that the window
* has been realized otherwise it will not work. lame.
*/
if (!GTK_WIDGET_REALIZED (window))
gtk_widget_realize (GTK_WIDGET (window));
if (startup_timestamp <= 0)
startup_timestamp = gdk_x11_get_server_time (GTK_WIDGET (window)->window);
gdk_x11_window_set_user_time (GTK_WIDGET (window)->window,
startup_timestamp);
gtk_window_present (GTK_WINDOW (window));
/* free the file list and reset to default */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment