Skip to content

feat/ draggable-region#92

Merged
wusyong merged 6 commits intotauri-apps:devfrom
amrbashir:feat/draggable-region
Mar 25, 2021
Merged

feat/ draggable-region#92
wusyong merged 6 commits intotauri-apps:devfrom
amrbashir:feat/draggable-region

Conversation

@amrbashir
Copy link
Copy Markdown
Member

@amrbashir amrbashir commented Mar 1, 2021

I add a custom titlebar example mainly to test drag.

winit implementation will have to wait until this PR is merged.

@amrbashir amrbashir changed the title feat/ draggable-region (gtk-rs) feat/ draggable-region Mar 1, 2021
@nklayman
Copy link
Copy Markdown
Member

nklayman commented Mar 2, 2021

Awesome! This is super great to have.

Comment thread src/application/gtkrs.rs Outdated
@nklayman
Copy link
Copy Markdown
Member

nklayman commented Mar 2, 2021

I tested this out and it worked really well except for two things:

  1. In the example, the maximize button won't unmaximize
  2. When dragging the window, when I start moving the cursor the window jumps down by about 20px. For reference, I'm on Ubuntu 20.10 with Gnome 3.38.3 and nvidia drivers.

@amrbashir
Copy link
Copy Markdown
Member Author

amrbashir commented Mar 2, 2021

  1. In the example, the maximize button won't unmaximize
  2. When dragging the window, when I start moving the cursor the window jumps down by about 20px. For reference, I'm on Ubuntu 20.10 with Gnome 3.38.3 and nvidia drivers.
  1. Since there is no getters implemented on the WindowProxy I can't get the window state (maximized or not to fire apropriate event).

  2. I thought I fixed that last night, I will have to recheck it

@amrbashir
Copy link
Copy Markdown
Member Author

amrbashir commented Mar 2, 2021

I just checked it again and the 20px jump doesn't happen to me, I am using AwesomeWM though not Gnome or Kde so that doesn't count I guess.

Not sure why it jumps 20px on your end. Last night I did have the 20px jump but I managed to fix it by passing clientX and clientY from the mouse event to the callback then added these values to current window position.

@amrbashir
Copy link
Copy Markdown
Member Author

amrbashir commented Mar 2, 2021

@nklayman when you have a chance, can you try with the latest commit ? hopefully it is fixed

@nklayman
Copy link
Copy Markdown
Member

nklayman commented Mar 2, 2021

Seems like that did it, nice work!

@amrbashir
Copy link
Copy Markdown
Member Author

amrbashir commented Mar 2, 2021

Nice, we will have to wait for winit's PR to be merged though.

@nothingismagick
Copy link
Copy Markdown
Member

Didn't the PR get merged already @amrbashir
rust-windowing/winit#1840

@amrbashir
Copy link
Copy Markdown
Member Author

amrbashir commented Mar 15, 2021

Yeah it is merged but winit hasn't released a new version yet so I can't finish the PR unless they publish or wry uses winit from a git rev

@amrbashir amrbashir marked this pull request as ready for review March 19, 2021 19:48
@amrbashir amrbashir changed the base branch from master to dev March 19, 2021 19:50
@wusyong
Copy link
Copy Markdown
Member

wusyong commented Mar 21, 2021

I guess we can wait for next winit release? The PR can leave as is until then.

@amrbashir
Copy link
Copy Markdown
Member Author

Yeah it can wait, I just wanted to finish the PR while I can.

@wusyong
Copy link
Copy Markdown
Member

wusyong commented Mar 25, 2021

@amrbashir Could you update the winit dependency to the commit that has this feature?
I think we'll fork it and publish a non-aggressive crate version for tauri beta temporarily.

@nothingismagick
Copy link
Copy Markdown
Member

@amrbashir amrbashir requested a review from a team as a code owner March 25, 2021 16:43
@amrbashir amrbashir requested review from a team March 25, 2021 16:43
Comment thread .changes/draggable-regions.md Outdated
@wusyong wusyong merged commit b2a0bfc into tauri-apps:dev Mar 25, 2021
@amrbashir amrbashir deleted the feat/draggable-region branch March 25, 2021 17:31
@github-actions github-actions Bot mentioned this pull request Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants