Skip to content
Commit eac4a817 authored by Joan Bruguera's avatar Joan Bruguera Committed by Christian Persch
Browse files

widget: Move clipboard store from finalize to unrealize

Fixes a regression from commit 0136048d.

Unfortunately, this causes a regression in the following simple case:
* Open two instances of a terminal like xfce4-terminal.
* Go to the first instance, copy some string of text, and close it.
* Go to the second instance and paste it. Due to the regression, it won't work.

The cause is that Widget::unrealize calls Terminal::widget_clipboard_data_clear,
this will set m_selection_owned[type] = false. Later when Terminal::~Terminal is
run, the piece of code that calls clipboard_set_text will not be run, because it
depends on m_selection_owned[type] being set (but it ran before on 0.62.3).

This commit moves this last piece of code to Terminal::widget_unrealize, which
is called before setting m_selection_owned[type] = false.

Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/349
(cherry picked from commit 94d6a3c1)
parent b2d98b82
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