diff --git a/typing-break/ChangeLog b/typing-break/ChangeLog index 3bba41568..8dc464a2b 100644 --- a/typing-break/ChangeLog +++ b/typing-break/ChangeLog @@ -1,3 +1,11 @@ +2008-11-20 Jens Granseuer + + Patch by: Maxim Ermilov + + * drw-selection.c: (drw_selection_reset), + (drw_selection_find_existing): use g_object_unref instead of the + deprecated gdk_window_unref (bug #561679) + ==================== 2.25.1 ==================== ==================== 2.24.0.1 ==================== diff --git a/typing-break/drw-selection.c b/typing-break/drw-selection.c index 29be67598..99b0980e8 100644 --- a/typing-break/drw-selection.c +++ b/typing-break/drw-selection.c @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Owen Taylor, Red Hat, Inc. @@ -46,10 +46,10 @@ drw_selection_reset (DrwSelection *drw_selection) if (drw_selection->owner_window) { gdk_window_remove_filter (drw_selection->owner_window, drw_selection_filter, drw_selection); - gdk_window_unref (drw_selection->owner_window); + g_object_unref (drw_selection->owner_window); drw_selection->owner_window = NULL; } - + if (drw_selection->invisible) { gtk_widget_destroy (drw_selection->invisible); drw_selection->invisible = NULL; @@ -81,20 +81,20 @@ drw_selection_find_existing (DrwSelection *drw_selection) drw_selection->owner_window = gdk_window_foreign_new (old); } XSync (xdisplay, False); - + if (gdk_error_trap_pop () == 0 && drw_selection->owner_window) { gdk_window_add_filter (drw_selection->owner_window, drw_selection_filter, drw_selection); - + XUngrabServer (xdisplay); - + return TRUE; } else { if (drw_selection->owner_window) { - gdk_window_unref (drw_selection->owner_window); + g_object_unref (drw_selection->owner_window); drw_selection->owner_window = NULL; } - + return FALSE; } } @@ -105,8 +105,8 @@ drw_selection_claim (DrwSelection *drw_selection) drw_selection->invisible = gtk_invisible_new (); g_signal_connect (drw_selection->invisible, "selection-clear-event", G_CALLBACK (drw_selection_clear), drw_selection); - - + + if (gtk_selection_owner_set (drw_selection->invisible, gdk_atom_intern (SELECTION_NAME, FALSE), GDK_CURRENT_TIME)) { @@ -167,7 +167,7 @@ DrwSelection * drw_selection_start (void) { DrwSelection *drw_selection = g_new (DrwSelection, 1); - + drw_selection->owner_window = NULL; drw_selection->invisible = NULL;