Patch by: Maxim Ermilov <zaspire@rambler.ru>
2008-11-20 Jens Granseuer <jensgr@gmx.net> Patch by: Maxim Ermilov <zaspire@rambler.ru> * drw-selection.c: (drw_selection_reset), (drw_selection_find_existing): use g_object_unref instead of the deprecated gdk_window_unref (bug #561679) svn path=/trunk/; revision=9147
This commit is contained in:
parent
4bf0fec262
commit
07eda34c36
2 changed files with 19 additions and 11 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-11-20 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
Patch by: Maxim Ermilov <zaspire@rambler.ru>
|
||||||
|
|
||||||
|
* 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.25.1 ====================
|
||||||
|
|
||||||
==================== 2.24.0.1 ====================
|
==================== 2.24.0.1 ====================
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
|
||||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
* 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
|
* 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.
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*
|
*
|
||||||
* Author: Owen Taylor, Red Hat, Inc.
|
* Author: Owen Taylor, Red Hat, Inc.
|
||||||
|
@ -46,10 +46,10 @@ drw_selection_reset (DrwSelection *drw_selection)
|
||||||
if (drw_selection->owner_window) {
|
if (drw_selection->owner_window) {
|
||||||
gdk_window_remove_filter (drw_selection->owner_window,
|
gdk_window_remove_filter (drw_selection->owner_window,
|
||||||
drw_selection_filter, drw_selection);
|
drw_selection_filter, drw_selection);
|
||||||
gdk_window_unref (drw_selection->owner_window);
|
g_object_unref (drw_selection->owner_window);
|
||||||
drw_selection->owner_window = NULL;
|
drw_selection->owner_window = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drw_selection->invisible) {
|
if (drw_selection->invisible) {
|
||||||
gtk_widget_destroy (drw_selection->invisible);
|
gtk_widget_destroy (drw_selection->invisible);
|
||||||
drw_selection->invisible = NULL;
|
drw_selection->invisible = NULL;
|
||||||
|
@ -81,20 +81,20 @@ drw_selection_find_existing (DrwSelection *drw_selection)
|
||||||
drw_selection->owner_window = gdk_window_foreign_new (old);
|
drw_selection->owner_window = gdk_window_foreign_new (old);
|
||||||
}
|
}
|
||||||
XSync (xdisplay, False);
|
XSync (xdisplay, False);
|
||||||
|
|
||||||
if (gdk_error_trap_pop () == 0 && drw_selection->owner_window) {
|
if (gdk_error_trap_pop () == 0 && drw_selection->owner_window) {
|
||||||
gdk_window_add_filter (drw_selection->owner_window,
|
gdk_window_add_filter (drw_selection->owner_window,
|
||||||
drw_selection_filter, drw_selection);
|
drw_selection_filter, drw_selection);
|
||||||
|
|
||||||
XUngrabServer (xdisplay);
|
XUngrabServer (xdisplay);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
if (drw_selection->owner_window) {
|
if (drw_selection->owner_window) {
|
||||||
gdk_window_unref (drw_selection->owner_window);
|
g_object_unref (drw_selection->owner_window);
|
||||||
drw_selection->owner_window = NULL;
|
drw_selection->owner_window = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,8 @@ drw_selection_claim (DrwSelection *drw_selection)
|
||||||
drw_selection->invisible = gtk_invisible_new ();
|
drw_selection->invisible = gtk_invisible_new ();
|
||||||
g_signal_connect (drw_selection->invisible, "selection-clear-event",
|
g_signal_connect (drw_selection->invisible, "selection-clear-event",
|
||||||
G_CALLBACK (drw_selection_clear), drw_selection);
|
G_CALLBACK (drw_selection_clear), drw_selection);
|
||||||
|
|
||||||
|
|
||||||
if (gtk_selection_owner_set (drw_selection->invisible,
|
if (gtk_selection_owner_set (drw_selection->invisible,
|
||||||
gdk_atom_intern (SELECTION_NAME, FALSE),
|
gdk_atom_intern (SELECTION_NAME, FALSE),
|
||||||
GDK_CURRENT_TIME)) {
|
GDK_CURRENT_TIME)) {
|
||||||
|
@ -167,7 +167,7 @@ DrwSelection *
|
||||||
drw_selection_start (void)
|
drw_selection_start (void)
|
||||||
{
|
{
|
||||||
DrwSelection *drw_selection = g_new (DrwSelection, 1);
|
DrwSelection *drw_selection = g_new (DrwSelection, 1);
|
||||||
|
|
||||||
drw_selection->owner_window = NULL;
|
drw_selection->owner_window = NULL;
|
||||||
drw_selection->invisible = NULL;
|
drw_selection->invisible = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue