Coder Social home page Coder Social logo

Comments (10)

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Well, I connected the widow to button-release-event for it to close when clicked outside any icon.

resultWindow.Connect("button-release-event", func(sw *gtk.ScrolledWindow, e *gdk.Event) bool {

A swiping action should not result in a mouse click.

This is beyond my control.

It seems GTK fires the button-release-event event on the end of swipe gestures... Probably some workaround is possible, but without a touch screen on my end it's going to take ages.

from nwg-drawer.

lheimbs avatar lheimbs commented on August 19, 2024

Hi Piotr,
Thanks for the reply. I'll try to get into this myself but it might take a while since I'm neither experienced with go nor gtk.

The dock/drawer/etc. are great programs btw. and really suit people like me who have a touchscreen device and don't want to use an entire DE like gnome/kde

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Thank you, it's great to hear.

I'm currently working hard on integration of all this stuff with a common management app, and some presets to choose from. It's going to be included into the next ArchLabs Linux iso. When I'm on the beta stage of this work, I'll try to get my old netbook back to life, and take a look at the issue. It's got touch screen, unfortunately broken. :/

from nwg-drawer.

nightly-brew avatar nightly-brew commented on August 19, 2024

A similar issue affects scrolling by grabbing the scrollbar with the mouse: when I release the bar, the drawer closes.
Even though the aformentioned issue is related to how gtk handles touch swiping, I think the button-release-event part could benefit from a little rework.

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

If you just want to close the window, without touching the keyboard, it's convenient to be able to just click outside icons.

resultWindow.Connect("button-release-event", func(sw *gtk.ScrolledWindow, e *gdk.Event) bool {
		btnEvent := gdk.EventButtonNewFromEvent(e)
		if btnEvent.Button() == 1 || btnEvent.Button() == 3 {
			if !*resident {
				gtk.MainQuit()
			} else {
				restoreStateAndHide()
			}
			return true
		}
		return false
	})

For this not to happen on drag end, we could restrict the action to just the right mouse button. What do you think?

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Should be "RMB" above. :) @lheimbs, could you build from the issue36 branch and tell me if it helps?

from nwg-drawer.

lheimbs avatar lheimbs commented on August 19, 2024

I just tried it and works nicely both while touch swiping and grabbing the scrollbar with the mouse.
Thanks!

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Very well. I need to wait some time before releasing, as there were too many releases lately. :) Thanks for testing!

from nwg-drawer.

nightly-brew avatar nightly-brew commented on August 19, 2024

Sounds great!
You might want to advertise this feature in the README though, so users aren't surprised to see the drawer disappear.

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Yes, I will. This will be mentioned in release notes, though, but who reads them?

from nwg-drawer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.