Straight line brush mask

It may be the case, for the moment I don’t find any redundant key. I will dig into the problem.

Don’t worry! It only has to work on Windows to dethrone Adobe. :grin:

@agriggio :+100:

i can eliminate the transparency issue, but i don’t get the colored spots on the screen

Maybe the procedure is not clear… Let me try to explain. First you click normally to define the starting point (without holding Alt), then you move the mouse to the end point (without clicking anything, i.e. without “dragging”), then you click again while holding the Alt key, and now you should have your line … Can you confirm this is what you were doing? Thanks!

I carefully followed your scheme, I got the first yellow point only, as if holding the Alt key was inactive and prevent setting a second point.

@agriggio

I just build the latest development version (1.9.3-16-g9140a11d0) and this new feature works as advertised/shown for me.

I’m on Linux (Debian 10.10/Buster).

@srgmro : Are you on the latest development version? Never mind, just noticed the version in your window.

Exactly, furthermore I translated the new lines in french. Are you on kde desktop ?

Nope, Xfce.

Hi, I have the same behaviour as @srgmro under Archlinux KDE.
I’ve tried it on my arch laptop under i3wm, it works!
The problem is with KDE

Hmm, I’m on Xfce as well but it does not work for me.
Xubuntu 20.04.2 LTS, Art Version: 1.9.3-16-g9140a11d0
Branch: master
Commit: 9140a11d0
Commit date: 2021-08-08.

My impression was that after clicking the Alt key to make that straight line, Xfce is waiting for a second key to do something. Using left Alt, I can move a window with mouse left-click and resize a window with Alt + right click. But no straight line in Art.

@jllailes / @paulmatth

I think @agriggio’s initial idea about this being a WM problem might be correct. I have run into alt/meta/super key problems in the past and WMs do tend to “steal” some of them for their own uses.

About Xfce: Have a look at the Window Manager Tweaks, specifically the Accessibility tab. The top entry, Key used to grab and move windows is set to Super in my case, I’m assuming yours is set to Alt (not sure if that is the default setting). I changed that back when I started using Krita and ran into the alt key being needed by some of the tools.

EDIT: Fixed typos.

If the control and shift keys do not pose a problem, would it be an option to let the straight line functionality work if you press both of them at the same time, instead of alt?

That’s it Jacques, thanks!

That’s another option, yes. I’ll double check whether the combination is still free in ART

The other way round would be to intercept the ALT key press (Widget::key-press-event) and avoid propagation to the WM (for this specific case) by returning true. It could be done in ImageArea.

The last combination (Shift for straight line and Alt for Erase) lead to the expected behavior for Straight lines under KDE. But Alt fail to reverse to the erase mode. But in that case we always have the possibility to check the Reverse box.
There is definitively a problem with the Alt Key under KDE.
Serge

@agriggio So I simply test the Alt key under KDE and effectively it is used to move windows whatever they are.

yes, but there’s nothing I can do about it… WM shortcuts are typically customizable by the user, so there’s always the risk of some clashes between WM shortcuts and app shortcuts. I think the best thing to do is to simply do nothing in this case. Ideally, ART should let you customise the shortcuts, but this is not going to happen anytime soon – or at least I have no plans to work on this…

@agriggio, Don’t worry about that, we have the checkbox to control the erase mode.
Sincerely
Serge