<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>405267</bug_id>
          
          <creation_ts>2019-03-09 14:50:13 +0000</creation_ts>
          <short_desc>Impossible to abort dragging from Dolphin to desktop by pressing ESC on Wayland while cursor is over desktop</short_desc>
          <delta_ts>2022-05-18 15:57:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>Containment</component>
          <version>5.20.90</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>wayland-only</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Silva">bugseforuns</reporter>
          <assigned_to name="Marco Martin">notmart</assigned_to>
          <cc>alex765</cc>
    
    <cc>andrea.ippo</cc>
    
    <cc>claudius.ellsel</cc>
    
    <cc>ddascalescu+kde</cc>
    
    <cc>dev+kde</cc>
    
    <cc>herzenschein</cc>
    
    <cc>kde</cc>
    
    <cc>kde</cc>
    
    <cc>magiblot</cc>
    
    <cc>mauromol</cc>
    
    <cc>nate</cc>
    
    <cc>null</cc>
    
    <cc>plasma-bugs-null</cc>
    
    <cc>postix</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/kwin/commit/e00d83670847c19c7f92e13b2bb1ef18ae093964</cf_commitlink>
          <cf_versionfixedin>5.25</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1842962</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2019-03-09 14:50:13 +0000</bug_when>
    <thetext>STEPS TO REPRODUCE
1. start Wayland session
2. drag some file/folder to desktop
3. press ESC while you are dragging the icon

OBSERVED RESULT
Dragging operation is not aborted

EXPECTED RESULT
Dragging operation is aborted like on X11

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1866564</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2019-07-01 15:17:24 +0000</bug_when>
    <thetext>correcting step 3:
3. press ESC while you are dragging the icon and you are hovering the desktop

Operating System: Arch Linux 
KDE Plasma Version: 5.16.2
KDE Frameworks Version: 5.59.0
Qt Version: 5.13.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1934422</commentid>
    <comment_count>2</comment_count>
    <who name="">magiblot</who>
    <bug_when>2020-06-03 20:34:07 +0000</bug_when>
    <thetext>This could be a Kwin bug: https://gitlab.com/kwinft/kwinft/-/issues/45
But I don&apos;t know if it has been reported in mainline Kwin.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953810</commentid>
    <comment_count>3</comment_count>
    <who name="Thiago Sueto">herzenschein</who>
    <bug_when>2020-08-29 14:12:26 +0000</bug_when>
    <thetext>I can consistently reproduce this on current Plasma from master branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956603</commentid>
    <comment_count>4</comment_count>
    <who name="Claudius Ellsel">claudius.ellsel</who>
    <bug_when>2020-09-10 17:38:27 +0000</bug_when>
    <thetext>I experience the same. Aborting with ESC works for me when the mouse is inside the dolphin window again. Just not when it is outside.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007528</commentid>
    <comment_count>5</comment_count>
    <who name="Dan Dascalescu">ddascalescu+kde</who>
    <bug_when>2021-03-01 09:32:48 +0000</bug_when>
    <thetext>Still seeing this issue with KDE neon 5.21.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2008690</commentid>
    <comment_count>6</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2021-03-04 19:40:11 +0000</bug_when>
    <thetext>Can confirm. Seems like the desktop needs to handle the escape key too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066920</commentid>
    <comment_count>7</comment_count>
    <who name="David Redondo">kde</who>
    <bug_when>2021-10-07 07:19:30 +0000</bug_when>
    <thetext>Theory without looking at code, the panel does not do keyboard focus so we can&apos;t escape?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2096807</commentid>
    <comment_count>8</comment_count>
    <who name="Andrea Ippolito">andrea.ippo</who>
    <bug_when>2022-01-22 14:58:07 +0000</bug_when>
    <thetext>Can confirm on latest tumbleweed (KDE 5.23.5 IIRC)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108891</commentid>
    <comment_count>9</comment_count>
    <who name="Marco Martin">notmart</who>
    <bug_when>2022-03-02 11:58:22 +0000</bug_when>
    <thetext>esc to cancel works only internally in the client, doesn&apos;t between any two arbitrary clients, regardless the  toolkit
looking on what gnome does, cancel on esc seems to be managed on mutter side, in meta-wayland-data-device.c

static gboolean
keyboard_drag_grab_key (MetaWaylandKeyboardGrab *grab,
                        const ClutterEvent      *event)
{
if (event-&gt;key.keyval == CLUTTER_KEY_Escape)
    {
    MetaWaylandDragGrab *drag_grab;

    drag_grab = wl_container_of (grab, drag_grab, keyboard_grab);
    meta_wayland_data_source_cancel (drag_grab-&gt;drag_data_source);
    meta_wayland_data_source_set_current_offer (drag_grab-&gt;drag_data_source, NULL);
    meta_dnd_actor_drag_finish (META_DND_ACTOR (drag_grab-&gt;feedback_actor), FALSE);
    drag_grab-&gt;feedback_actor = NULL;
    data_device_end_drag_grab (drag_grab);

    return TRUE;
    }

return FALSE;
}


I think we should do it server side as well in kwin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108913</commentid>
    <comment_count>10</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-03-02 13:44:15 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwayland-server/-/merge_requests/356</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108915</commentid>
    <comment_count>11</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-03-02 13:47:58 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2083</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2109083</commentid>
    <comment_count>12</comment_count>
    <who name="Marco Martin">notmart</who>
    <bug_when>2022-03-03 09:09:33 +0000</bug_when>
    <thetext>Git commit 7c09b4637c9ef9d4e326443a41edd2216de438a4 by Marco Martin.
Committed on 03/03/2022 at 09:09.
Pushed by mart into branch &apos;master&apos;.

Add a methood to fore cancel any drag in progress

This is needed to cancel drags by pressing Escape which is
resposibility of the compositor

M  +17   -9    src/server/seat_interface.cpp
M  +5    -0    src/server/seat_interface.h
M  +2    -2    src/server/seat_interface_p.h

https://invent.kde.org/plasma/kwayland-server/commit/7c09b4637c9ef9d4e326443a41edd2216de438a4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2109087</commentid>
    <comment_count>13</comment_count>
    <who name="Marco Martin">notmart</who>
    <bug_when>2022-03-03 09:54:23 +0000</bug_when>
    <thetext>Git commit e00d83670847c19c7f92e13b2bb1ef18ae093964 by Marco Martin.
Committed on 03/03/2022 at 09:54.
Pushed by mart into branch &apos;master&apos;.

Force cancel of any drag in progress when Escape is pressed

when escape is pressed when dragging between different clients,
cancelling any drag is compositor&apos;s responsibility

M  +16   -0    src/input.cpp

https://invent.kde.org/plasma/kwin/commit/e00d83670847c19c7f92e13b2bb1ef18ae093964</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2110709</commentid>
    <comment_count>14</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2022-03-11 13:18:32 +0000</bug_when>
    <thetext>This bug persists. Drag-and-rop is completed instead of aborted when I press ESC key. And now I can reproduce even on X11.



Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Graphics Platform: Wayland</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2110752</commentid>
    <comment_count>15</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-03-11 17:07:51 +0000</bug_when>
    <thetext>Cannot reproduce that with current git master. It could be a separate thing. Could you file a new bug report for it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2124372</commentid>
    <comment_count>16</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2022-05-18 13:04:37 +0000</bug_when>
    <thetext>(In reply to Nate Graham from comment #15)
&gt; Cannot reproduce that with current git master. It could be a separate thing.
&gt; Could you file a new bug report for it?

reported as bug 453981</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2124443</commentid>
    <comment_count>17</comment_count>
    <who name="Andrea Ippolito">andrea.ippo</who>
    <bug_when>2022-05-18 15:57:02 +0000</bug_when>
    <thetext>In my case Esc only cancels the drag and drop operation if pressed after the mouse button has been released: as long as the button is pressed, Esc presses are ignored (I am pressing Esc repeatedly in this screen recording while the little green &quot;+&quot; icon is shown:

https://photos.app.goo.gl/iWgFTKRoC6vX6J7F6</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>