Skip to content

gpui: Reset external_files_dragged after successful drag-drop on macOS#48727

Merged
MrSubidubi merged 2 commits intozed-industries:mainfrom
Albab-Hasan:fix/reset-external-files-dragged-after-drop
Feb 8, 2026
Merged

gpui: Reset external_files_dragged after successful drag-drop on macOS#48727
MrSubidubi merged 2 commits intozed-industries:mainfrom
Albab-Hasan:fix/reset-external-files-dragged-after-drop

Conversation

@Albab-Hasan
Copy link
Contributor

@Albab-Hasan Albab-Hasan commented Feb 8, 2026

after a successful file drag-drop, conclude_drag_operation did not reset external_files_dragged to false. since dragging_exited (the only place that resets this flag) is never called for successful drops (only for cancelled ones), the flag stayed true permanently. this caused synthetic drags (used for text selection during buffer scrolling) to be suppressed for the lifetime of the window.

Release Notes:

  • N/A

after a successful file drag-drop, conclude_drag_operation did not reset
external_files_dragged to false. since dragging_exited (the only place
that resets this flag) is never called for successful drops (only for
cancelled ones), the flag stayed true permanently. this caused synthetic
drags (used for text selection during buffer scrolling) to be suppressed
for the lifetime of the window.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 8, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Feb 8, 2026
@maxdeviant maxdeviant changed the title fix: reset external_files_dragged after successful drag-drop on macos gpui: Reset external_files_dragged after successful drag-drop on macOS Feb 8, 2026
@MrSubidubi MrSubidubi changed the title gpui: Reset external_files_dragged after successful drag-drop on macOS gpui: Reset external_files_dragged after successful drag-drop on macOS Feb 8, 2026
Copy link
Member

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice digging, thanks for this!

Whilst looking into this, I noticed we do some redundant stuff here and can centralize the logic here a bit, hence I quickly hopped on to add that refactor. Didn't want to annoy you with that.

That said, the fix itself looks very nice! Thank you for the PR and congratulations to your first contribution! 🎉

@MrSubidubi MrSubidubi self-assigned this Feb 8, 2026
@MrSubidubi MrSubidubi enabled auto-merge (squash) February 8, 2026 22:45
@MrSubidubi MrSubidubi merged commit 87c92f3 into zed-industries:main Feb 8, 2026
27 checks passed
baldwindavid added a commit to baldwindavid/zed that referenced this pull request Feb 9, 2026
* main: (57 commits)
  agent: Fix disabled MCP servers disappearing from UI after restart (zed-industries#47758)
  Update Rust crate git2 to v0.20.4 [SECURITY] (zed-industries#48400)
  Update Rust crate time to v0.3.47 [SECURITY] (zed-industries#48514)
  gpui: Reset `external_files_dragged` after successful drag-drop on macOS (zed-industries#48727)
  language: Return early if no grammars are added (zed-industries#48685)
  Properly handle multi-char folds (zed-industries#48721)
  collab: Proxy `GET /extensions` to Cloud (zed-industries#48717)
  git: Fix a potential misalignment in the side-by-side diff (zed-industries#48690)
  Move extension API DTOs into `cloud_api_types` (zed-industries#48689)
  git: Add a setting for the default view mode of `SplittableEditor` (zed-industries#48440)
  Use proper settings name for semantic tokens' settings UI (zed-industries#48686)
  gpui: Fix restarting panicking due to double borrows on windows (zed-industries#48667)
  Strip broken thinking blocks from Anthropic requests (zed-industries#48548)
  keymap_editor: Add `alt-l` keybinding for cycling favorite models (zed-industries#48390)
  Only raise Windows timer resolution while blocking with timeout (zed-industries#48379)
  editor: Propagate `buffer_font_features` to signatureHelp popover (zed-industries#48653)
  Add configurable LSP timeout setting (zed-industries#44745)
  editor: Use buffer_font for folds and change foreground color (zed-industries#48652)
  lsp: Update root_path for compatibility with language servers (zed-industries#48587)
  Fix panic with LSP folds on disappearing excerpts (zed-industries#48649)
  ...
@Albab-Hasan
Copy link
Contributor Author

@MrSubidubi thanks a lot for the kind words! really appreciate the review.

it did take a few days of digging but it was a great learning experience. im very eager to keep contributing. if there are any UI or AI related tasks (or honestly anything), i'd be happy to take them on. thanks again!

@Albab-Hasan
Copy link
Contributor Author

@MrSubidubi also i would appreciate it if you could check out this pr if u have free time, its a minimal code cleanup. (im not sure about this organizations policy about one liners, feel free to ignore if thats an issue)

#48317

@MrSubidubi
Copy link
Member

if there are any UI or AI related tasks (or honestly anything), i'd be happy to take them on. thanks again!

Appreciated! Feel free to search through our issues, we try labelling these to be suitable for external contributors. You could probaby look into either UI labeled issues or good first issues there and take whatever you like.

im not sure about this organizations policy about one liners
We are generally fine with these as long as they provide some value, however, context often helps. I already saw that PR but couldn't come to an easy decision there because of that. Will get back there

naaiyy added a commit to Glass-HQ/Glass that referenced this pull request Feb 16, 2026
Key changes:
- Side-by-side diff UX improvements (zed-industries#48821) - major diff view polish
- Display map refactoring - large cleanup of display_map.rs (~1000 line reduction)
- Split editor growth (zed-industries#48753) - significant expansion of split.rs
- Multi-char folds fix (zed-industries#48721)
- New multi workspace (zed-industries#47795, then reverted zed-industries#48776)
- Default view mode setting for SplittableEditor (zed-industries#48440)
- macOS drag-drop fix: reset external_files_dragged (zed-industries#48727)
- Windows: OS caption/buttons for custom titlebar (zed-industries#48330)
- Windows timer resolution guard (zed-industries#48379)
- Bedrock Claude Opus 4.6 model (zed-industries#48525)
- MCP servers: fix disabled servers disappearing after restart (zed-industries#47758)
- Shell command parser extracted to shared crate (zed-industries#48660)
- Format-on-save for streaming edit file tool (zed-industries#48663)
- Agent: insert images at cursor position (zed-industries#48779)
- Project panel: improved file/folder creation in folded paths (zed-industries#46750)
- Folding ranges panic fix (zed-industries#48809)
- REPL: shutdown all kernels on app quit (zed-industries#48760)
- Extension CI improvements
- Security updates: time v0.3.47, git2 v0.20.4

Conflict resolution:
- collab (Cargo.toml, extensions API, db, tests): deleted
- GPUI (8 files): deleted from Glass (handled in Obsydian-HQ/gpui)
- Cargo.lock: took upstream

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants