Guides not accessible in KDE with oxygen-gtk

Bug #1109812 reported by Christopher B. Wright
108
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Inkscape
In Progress
Medium
Maggio
Linux From Scratch
New
Undecided
Unassigned

Bug Description

Running inkscape-trunk in Kubuntu 12.10, listed as version 1:0.48+devel+12069+34~quantal1 from the Muon Package Manager.

Expected behavior:

When I click on the top ruler and drag down, a red horizontal guide will appear that can be placed anywhere on the canvas. When I click on the left ruler and drag right, a red guide vertical guide will appear that can be placed anywhere on the canvas.

Actual behavior:

When I click on the ruler (either the top or the left ruler, it doesn't make a difference) the mouse immediately changes into the four-direction symbol that KDE uses when you're dragging a window across the screen. And, in fact, that's what it does--instead of dragging a red horizontal or vertical guide across the screen, it drags the window in that direction.

This behavior was not present in 48.3 (the default package in the Ubuntu repositories) and there have been no updates to KDE applications or libraries between using 48.3 and using inkscape-trunk.

Partial workaround:

To create a HORIZONTAL guide, go to the TOP ruler and try to pull it down. The window will start to move down--immediately release the mouse button, then hover your mouse over the LEFT ruler. You will see the horizontal guide, and wherever you click on the left ruler is where the guide will come to rest.

To create a VERTICAL guide, go to the LEFT ruler and try to pull it to the right. The window will start to move right--immediately release the mouse button, then hover your mouse over the TOP ruler. You will see the veritical guide, and wherever you click on the top ruler is where the guide will come to rest.

At present I haven't found a workaround removing the guides.

Tags: guides ui kde
su_v (suv-lp)
tags: added: guides
Revision history for this message
su_v (suv-lp) wrote :

> Running inkscape-trunk in Kubuntu 12.10

Not reproduced with inkscape-trunk on
- Ubuntu 12.04 (inkscape-trunk r12064, r12072, Unity, Gnome)
- Ubuntu 12.10 (local trunk build r12063, r12072, Unity (Radiance), Gnome 3.6 (Adwaita GTK2)
- OS X 10.7.4 (r12069, r12072, GTK+/X11 2.24.13, GTK+/Quartz 2.24.14,
  with various GTK+ theme engines: Clearlooks, Murrine, Adwaita GTK2 from Gnome 3.6, Aurora, Equinox, Nodoka)

Which GTK+ theme (engine) do you use under KDE? Have you tested other gtk theme engines, including stock 'Raleigh?

> Partial workaround:

Note that as additional workaround, you can also create new guides with 'Extensions > Render > Guides Creator'.

> At present I haven't found a workaround removing the guides.

The usual ways to delete guides (not involving the rulers) don't work either?
a) Hover a guide until it gets highlighted and press 'Del' (or 'Backspace')
   (Note: be careful not to delete a current selection instead ;-) )
b) Double-click a guide to open the Guides dialog, and press 'Delete'
c) Use the new menu item in current trunk 'Edit > Delete All Guides' to delete all existing guides

Another new feature in current trunk (not present in the stable version 0.48): a single click on the rulers hides/shows existing guides.

Revision history for this message
Christopher B. Wright (wrightc) wrote :

I'm not surprised that it works under Gnome -- I suspect this is a KDE only bug.

I can confirm that it works just fine in Raleigh. (was using oxygen-gtk when the bug occurred.)

However, I want to stress that Inkscape .48.3 worked properly using oxygen-gtk, while inkscape-trunk does not. (In other words, oxygen-gtk didn't introduce something new that made Inkscape suddenly stop working. It looks like Inkscape introduced something new that's not working with oxygen-gtk).

I tested the three methods you mentioned for removing guides. It appears that when I'm using a theme that interferes with guide functionality, none of the methods work:

a) hovering over the guide does not trigger a highlight, and won't let you delete it.

b) double-clicking on a guide does not present the guides dialog

c) selecting the Edit > Delete All Guides menu has no effect.

There are a number of different GTK themes available on my KDE installation, I will test all of them with Inkscape and post again with a report on which themes work and which do not.

Revision history for this message
Christopher B. Wright (wrightc) wrote :

Based on my tests it is specifically the oxygen-gtk theme that has this problem. Every other theme in the default install works. Unfortunately, oxygen-gtk is the default setting for a vanilla Kubuntu Quantal install, so anyone using the latest Kubuntu is probably going to have this problem.

su_v (suv-lp)
no longer affects: ubuntu
Revision history for this message
su_v (suv-lp) wrote :

@Alex - any thoughts on whether the "migrated-from-GIMP" ruler replacement (bug #802125 and later commits) in current trunk could be related to this incompatibility with oxygen-gtk under KDE?

Revision history for this message
su_v (suv-lp) wrote :

@Christopher:
- what about the rulers in GIMP - can you drag&drop a guide there?
- is drag&drop failing elsewhere in Inkscape (similar to e.g. bug #886795: filter primitives in trunk's filter editor cannot be drag&dropped under KDE)?

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

@~suv - I don't see an obvious way that the ruler changes can have caused this. The guide creation stuff is taken care of by handling mouse events on the GtkEventBox that contains the rulers, rather than events on the rulers themselves. The event handling code is in the sp_dt_ruler_event(...) function in src/desktop-events.cpp

To isolate the problem, I guess we need to answer two questions:

1. Are mouse events on the rulers being caught? (i.e., control should pass to the event handler function)
2. Is the event handler doing its job properly?

Revision history for this message
Christopher B. Wright (wrightc) wrote :

@~suv, the guides in GIMP appear to work regardless of what GTK theme KDE is using. I tested them successfully with oxygen-gtk.

As to whether there are any other issues with dragging, I haven't found them. I'm able to:

 - drag an svg object as a file from dolphin onto an inkscape canvas, and manipulate the object.
 - create a basic shape inkscape and drag it around.
 - group and ungroup objects
 - double-click on an object in a group to break the group and then drag the object around.

I'm not familiar with the term primitive in the context of bug 886795 so I can't test it specifically. If by "primitive" the bug report means "basic shapes" (square, line, etc) then I'm not having any problems with that.

Revision history for this message
su_v (suv-lp) wrote :

> I'm not familiar with the term primitive in the context of bug 886795

See
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Filters-Dialog.html#Filters-Dialog-Defining>

"Filter primitives" are e.g. 'Gaussian Blur', 'Offset', 'Merge' seen in this screenshot of the Filter Editor dialog:
<http://tavmjong.free.fr/INKSCAPE/MANUAL/images/FILTERS/Dialog_FilterEffects_DropShadow4.png>

Revision history for this message
Christopher B. Wright (wrightc) wrote :

Thanks! Based on that information I can confirm that this problem appears unrelated to bug 886795. I was able to apply a gaussian blur to a circle and drag it around without any difficulties.

Revision history for this message
su_v (suv-lp) wrote :

> I was able to apply a gaussian blur to a circle and drag it around

Sorry, bug #886795 is about rearranging filter primitives in the filter editor dialog, not about dragging (filtered or unfiltered) vector objects on-canvas. Please don't spend additional time with trying to reproduce it unless you want to dive into custom filter effects in Inkscape anyway ;-) - bug #886795 is just another rather recent drag&drop-related report I recalled to be only occurring with KDE / oxygen-gtk too, and otherwise not directly connected to the problem with the guides/rulers reported here.

Revision history for this message
Ted Janeczko (janeczko-ted) wrote :

@Christopher: The oxygen theme allows dragging on any empty area in a window to move it, and for some reason the rulers are being treated as empty areas (most likely an issue in a mouse event handler). As a workaround, you can specify that oxygen only allows window moving via title-bar drag by running "oxygen-settings" and changing the "Windows' drag mode" in the "General" tab of the "Widget Style" settings. Hope that helps!

Revision history for this message
Christopher B. Wright (wrightc) wrote :

@Ted: Thank you! The workaround does solve the problem. I can also confirm that changing the default setting to "drag from titlebar, menubar, and toolbars" will also fix the problem (apparently the ruler is not included in those areas.)

Revision history for this message
Maggio (dev-maggio) wrote :

Hello,

I confirm this bug.

We can fix this bug by replacing "TRUE" by "FALSE" at : http://bazaar.launchpad.net/~inkscape.dev/inkscape/RELEASE_0_48_BRANCH/view/head:/src/desktop-events.cpp#L273

PS: "TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further."

Changed in inkscape:
assignee: nobody → Maggio (dev-maggio)
assignee: Maggio (dev-maggio) → nobody
Maggio (dev-maggio)
Changed in inkscape:
status: New → Confirmed
assignee: nobody → Maggio (dev-maggio)
status: Confirmed → In Progress
Revision history for this message
Maggio (dev-maggio) wrote :
Maggio (dev-maggio)
Changed in inkscape:
assignee: Maggio (dev-maggio) → nobody
Revision history for this message
su_v (suv-lp) wrote :

@maggio - you patch fails to apply (2 out of 3 hunks FAILED) to current trunk (lp:inkscape) - it seems to be intended for the current stable release branch . Based on the original report, the stable branch (lp:inkscape/0.48.x) is _not_ affected by this issue - could you clarify what the diff is aimed to fix in current stable?

Revision history for this message
Maggio (dev-maggio) wrote :

My patch fix the creation of horizontal and vertical guides for KDE's users for the oxygen-gtk.
My patch fix only the rulers.

Explanation:
In KDE, you can move a window via a non-interactive widget just by cliking on it.
Have a look : https://www.youtube.com/watch?v=lQJiOvyya30 at 1:00 to 1:30

Many widgets are affected by this behavior in inkscape: SPRuler, FiltersPanel, etc... To change this behavior we need to break the propagation chain of widget event by returning TRUE. It's important to do this on the last event managed by inkscape.

================================================================================
NB: After searching, gimp do different way: he attache a latest event and break on it
Please see :
https://git.gnome.org/browse/gimp/tree/app/display/gimpdisplayshell-callbacks.c?h=gimp-2-6
https://git.gnome.org/browse/gimp/tree/app/display/gimpdisplayshell.c?h=gimp-2-6

  /* Workaround for GTK+ Wintab bug on Windows when creating guides by
   * dragging from the rulers. See bug #168516.
   */
================================================================================

Changed in inkscape:
status: In Progress → Confirmed
Maggio (dev-maggio)
Changed in inkscape:
assignee: nobody → Maggio (dev-maggio)
status: Confirmed → In Progress
Revision history for this message
Maggio (dev-maggio) wrote :
Revision history for this message
Peter Funk (pf-artcom-gmbh) wrote :

Yesterday I've downloaded and installed inkscape 0.91.0+40~ubuntu14.04.1 from the
http://ppa.launchpad.net/inkscape.dev/stable/ubuntu
on my Kubuntu laptop (I'm using the Oxygen Theme too). When I left click on the ruler and move the cursor while holding the mouse button, it starts to move the whole inkscape window instead of dragging a new guide line onto the drawing canvas. The old version of inkscape (0.48 which came from the Ubuntu 14.04 official repository) did not show this behaviour.

I would like to help to sort this regression out. What should I do to assist?

Revision history for this message
Rizky Djati Munggaran (ridjam) wrote :

@Peter Funk: The answer has been cleared sir, if you still Oxygen Theme, you can specify that oxygen only allows window moving via title-bar drag by running "oxygen-settings" and changing the "Windows' drag mode" in the "General" tab of the "Widget Style" settings.

I'm using Inkscape on KDE too ^_^

Revision history for this message
Peter Funk (pf-artcom-gmbh) wrote :

After applying the setting suggested by Ted in comment #11 ( https://bugs.launchpad.net/inkscape/+bug/1109812/comments/11 ) dragging guide lines out of the rulers works just fine. It is a pity, that this not the default setting in KDE on Kubuntu 14.04

su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Medium
su_v (suv-lp)
summary: - Guides not accessible in KDE
+ Guides not accessible in KDE with oxygen-gtk
Revision history for this message
notklaatu (klaatu) wrote :

I say Linux From Scratch but I actually mean Slackware, which is not listed. However, I am compiling Inkscape from source, so that's from scratch in a sense.

Revision history for this message
su_v (suv-lp) wrote :

Patch from comment 16 (originally written AFAIU for outdated 0.48 stable release branch which is not affected by the bug tracked in this report) ported to 0.91.x for testing. [1]

--
[1] so far verified that
* lp:inkscape/0.91.x still compiles with patch applied,
* dragging guides still works as expected on a system not affected by this bug.
Not tested with current trunk at all (patch does apply to trunk with a few offsets).

Revision history for this message
IFo Hancroft (ifohancroft) wrote :

I've tried the https://bugs.launchpad.net/inkscape/+bug/1109812/+attachment/4438563/+files/1109812-Maggio-patch-for-091x-v1.diff patch, patching it in the root directory of Inkscape source doing:
$ patch -p0 < path/to/downloaded/1109812-Maggio-patch-for-091x-v1.diff
Then compiled it from source (0.91), configuring it with --prefix=/home/ifohancroft/Downloads/inkscape under Kubuntu 14.10 x86_64, KDE 4.14.1, with Qt 4:4.8.6 I believe, gtk3-engines-oxygen 1.4.0 and gtk2-engines-oxygen 1.4.5

Revision history for this message
IFo Hancroft (ifohancroft) wrote :

^ and it doesn't work

Revision history for this message
su_v (suv-lp) wrote :

@IFo Hancroft - thanks a lot for testing and reporting back!

@Maggio - any chance you could revisit your patch from comment #16 (for the 0.48 stable release branch), and provide an updated version of the proposed fix for the current stable release branch 0.91 <lp:inkscape/0.91.x> and for trunk <lp:inkscape>?

Revision history for this message
Pavel Kretov (firegurafiku) wrote :

I second that. This bug exists in Inkscape 0.91 in KDE5 with Breeze
theme too, and it makes nearly impossible to draw anything more or
less complex. Are there any chances too see it fixed soon?

Revision history for this message
Jef Lemaire (jeflemaire) wrote :

I too suffer from this bug with KDE5+Breeze in Inkscape trunk. Setting the GTK style to QtCurve does the job even though it is not as well implemented a GTK theme as oxygen-gtk... But at least I can use guides in Inkscape.

Revision history for this message
Thorsten Rochelmeyer (thorsten-1) wrote :

Bug still exists with 0.91 with KDE (Kubuntu 14.04 LTS in my case). Pretty annoying, would be nice if this could be fixed pretty soon.

Revision history for this message
Camilo (camicami) wrote :

Yup, same problem with Mint KDE 17.3

Revision history for this message
Falco Kleinschmidt (a-fk-u) wrote :

Problem exists in Netrunner 17 Horizon with "carbon-gtk" as GTK2-Design. No problem when using "oxygen-gtk" as GTK2-Design.

Revision history for this message
Wirefree (wirefree) wrote :

Problem still present in the latest 0.92 on Slackware 14.2. I used workarounds from comments #11 and #12 to get the guidelines to work.

Revision history for this message
Valdas (jvaldas) wrote :

Problem present in Kubuntu 16.10 (plasma 5.8.5, frameworks 5.28.0, qt 5.6.1, widget style: oxygen-gtk), Inkscape 0.92.1 unknown.
Workaround from comment #11 NOT helping.

Revision history for this message
Zirneklitis (karlo-k) wrote :

The same problem using Fedora 27. Workaround from comment #11 works for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.