D5712: Validate surface is valid when sending TextInput leave event

2017-05-05 Thread David Edmundson
This revision was automatically updated to reflect the committed changes.
Closed by commit R127:93fb3260679b: Validate surface is valid when sending 
TextInput leave event (authored by davidedmundson).

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5712?vs=14157=14167

REVISION DETAIL
  https://phabricator.kde.org/D5712

AFFECTED FILES
  autotests/client/test_text_input.cpp
  src/server/textinput_interface_v2.cpp

To: davidedmundson, #plasma, graesslin
Cc: apol, graesslin, plasma-devel, #frameworks, spstarr, progwolff, Zren, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, lukas


D5712: Validate surface is valid when sending TextInput leave event

2017-05-05 Thread Martin Gräßlin
graesslin accepted this revision.
graesslin added a comment.
This revision is now accepted and ready to land.


  Thanks for adding the test!

REPOSITORY
  R127 KWayland

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D5712

To: davidedmundson, #plasma, graesslin
Cc: apol, graesslin, plasma-devel, #frameworks, spstarr, progwolff, Zren, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, lukas


D5712: Validate surface is valid when sending TextInput leave event

2017-05-05 Thread David Edmundson
davidedmundson updated this revision to Diff 14157.
davidedmundson added a comment.
Restricted Application edited projects, added Plasma; removed Plasma on Wayland.


  Also validate the enterEvent, this makes it symetric to pointer enter/leave 
  events that have the same check.
  
  I've also added a test case.

REPOSITORY
  R127 KWayland

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5712?vs=14142=14157

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D5712

AFFECTED FILES
  autotests/client/test_text_input.cpp
  src/server/textinput_interface_v2.cpp

To: davidedmundson, #plasma, graesslin
Cc: apol, graesslin, plasma-devel, #frameworks, spstarr, progwolff, Zren, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, lukas


D5712: Validate surface is valid when sending TextInput leave event

2017-05-05 Thread Aleix Pol Gonzalez
apol added a comment.


  +1
  FWIW, this fixes my initial issue.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D5712

To: davidedmundson, #plasma, graesslin
Cc: apol, graesslin, plasma-devel, #frameworks, spstarr, progwolff, Zren, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, lukas


D5712: Validate surface is valid when sending TextInput leave event

2017-05-04 Thread Martin Gräßlin
graesslin requested changes to this revision.
graesslin added a comment.
This revision now requires changes to proceed.


  Please add a unit test case.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D5712

To: davidedmundson, #plasma, graesslin
Cc: graesslin, plasma-devel, #frameworks, spstarr, progwolff, Zren, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, lukas


D5712: Validate surface is valid when sending TextInput leave event

2017-05-04 Thread David Edmundson
davidedmundson created this revision.
Restricted Application added projects: Plasma on Wayland, Frameworks.
Restricted Application added subscribers: Frameworks, plasma-devel.

REVISION SUMMARY
  It's possible for the surface to be unbound when we send the leave
  event; we've called Resource::unbind() of Surface, so the Surface has,
  deleteLater called, but it's still a valid object, and the first check
  passes.
  
  We get in this situation because when a surface is destroyed, we're
  handling text input from the same source event.
  
  Sending a nullpointer is a protocol error, and wayland kindly closes the
  connection.
  
  This fixes my constant:
  "Did the Wayland server die" error messages when running clients.

TEST PLAN
  Got errors after setting up qt virtual keyboard.
  Had reproducible case.
  Restarted kwin after this patch, now doesn't crash.

REPOSITORY
  R127 KWayland

BRANCH
  davidedmundson/xdgv6

REVISION DETAIL
  https://phabricator.kde.org/D5712

AFFECTED FILES
  src/server/textinput_interface_v2.cpp

To: davidedmundson, #plasma
Cc: plasma-devel, #frameworks, spstarr, progwolff, Zren, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, lukas