Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41005

DataOffer not invalidated when client loses keyboard focus

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.3.1
    • QPA: Wayland
    • None
    • linux,embedded, lipstick.

    Description

      According to wayland doc:
      A.10.2.6. wl_data_device::selection - advertise new selection
      The selection event is sent out to notify the client of a new wl_data_offer for the selection for this device. The data_device.data_offer and the data_offer.offer events are sent out immediately before this event to introduce the data offer object. The selection event is sent to a client immediately before receiving keyboard focus and when a new selection is set while the client has keyboard focus. The data_offer is valid until a new data_offer or NULL is received or until the client loses keyboard focus.

      The data_offer object should be invalidated when client loses keyboard focus. Otherwise in following scenario, it will become zombie object:
      start app1 -> copy text -> start app2 -> paste text -> close app1 -> paste again in app2 -> seg fault in qtwayland.

      The root cause is that when app2 takes focus the first time, data_device.data_offer event was sent to it in DataDevice::setFocus. When app1 is closed, the data source reference in data offer becomes invalid. so when trying to paste again in app2, segmentation faults

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            janichol Andy Nichols
            li.qiu Li Qiu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes