Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cancel on Quit not work when editor is hidden #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hprmedina opened this issue Jun 10, 2020 · 16 comments
Closed

Cancel on Quit not work when editor is hidden #342

hprmedina opened this issue Jun 10, 2020 · 16 comments
Assignees
Labels

Comments

@hprmedina
Copy link
Contributor

I found a bug...(I think)

Steps:
1.- Take a capture and keep it "unsave".
2.- When the editor is open, right click on the tray icon and choose "Quit", then, ksnip ask for confirmation, "The capture "" has been modified. Do you want to save it?" choose "Cancel", then the confirmation dialog closes and the editor remains.
3.- Close the editor. The capture still is in memory and unsaved.
4.- Now right click on the tray icon and choose "Quit", then, ksnip ask for confirmation again, select "Cancel", then the confirmation dialog closes and too the application, "Cancel" not work. Now we loose the unsaved capture.


Version: 1.7.0-continuous
Build: 1212-7bf4d18

Using:
Qt5
X11
KDE Wayland
Gnome Wayland

@DamirPorobic
Copy link
Member

DamirPorobic commented Jun 10, 2020

Exotic workflow :)

I'll have a look at it.

@DamirPorobic DamirPorobic self-assigned this Jun 16, 2020
@DamirPorobic
Copy link
Member

Can't reproduce this neither.

First I try to quit when application is open, dialog pops up, I cancel, ksnip is open and image unsaved.
Next, I click close application, ksnip is minimized to try, not visible. I click on try and select quit, dialog pops up again, I select cancel, dialog closes, ksnip is still in tray. When I click on tray icon, ksnip shows up again.

@DamirPorobic
Copy link
Member

Tried with OpenSUSE 15.0 Plasma Wayland, seems to be working.

@hprmedina
Copy link
Contributor Author

Maybe is a configuration, this are my configuration file:

[Application]
ApplicationStyle=Adwaita-Dark
AutoCopyToClipboardNewCaptures=true
SaveDirectory=/home/rodrigo
UseTabs=false

[ImageGrabber]
LastRectArea=@rect(401 102 425 330)

[KImageAnnotator]
ToolColor_0=@variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0)
ToolColor_1=@variant(\0\0\0\x43\x1\xff\xff\0\0\xff\xff\0\0\0\0)
ToolColor_8=@variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0)
ToolFillType_0=1
ToolFillType_8=0
ToolTextColor_0=@variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\xff\xff\0\0)
ToolTextColor_12=@variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\xff\xff\0\0)
ToolType=8
ToolWidth_0=1
ToolWidth_15=1
ToolWidth_9=8

[MainWindow]
Position=@point(251 27)

@DamirPorobic
Copy link
Member

DamirPorobic commented Jun 16, 2020

Have you tested this on another machine?

@hprmedina
Copy link
Contributor Author

Doing more tests, is the same issue with several options in tray icon:

  • "new" always works fine.
  • "open" and then cancel, ksnip closes.
  • "save" always works fine.
  • "copy" always works fine.
  • "upload" and then "no" ksnip closes.
  • "quit" and any option ksnip closes.

The problem is not related with unsaved captures, is only some options in tray icon when the editor is hidden. When the editor is displayed all options works fine and ksnip remains active.

looking the messages, before ksnip closes appears two messages:

2020-06-16T20:10:06.847841-04:00 localhost gnome-shell[2165]: Window manager warning: Invalid WM_TRANSIENT_FOR window 0x220000d specified for 0x240004a.
2020-06-16T20:10:06.869
326-04:00 localhost gnome-shell[2165]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x240004a

maybe some issue in communications between tray and the editor? I will look for this kind of messages on the net...

@DamirPorobic
Copy link
Member

How do you enable tray icon on GNOME? When I close ksnip it seems to be still running according to console output but I neither see the application nor the tray icon.

@hprmedina
Copy link
Contributor Author

You must to install an extension, I use https://extensions.gnome.org/extension/1031/topicons/

@DamirPorobic
Copy link
Member

Can you check if this is working with a different Extension for TrayIcon? The GitHub Page for the Extensions says:

In particular, no wayland support can be achieved.

...

Meanwhile, I encourage you to migrate to libappindicator and its extension,

Can you quickly write down the steps that are required to install an extension?

@hprmedina
Copy link
Contributor Author

hprmedina commented Jun 18, 2020

Install extension is very easy using browser, simply open the url for topicons, then the browser suggest to install browser extensions if you not installed before:
image
install the "browser extensions" and next reload the page of topicons and will appears an "on/off" switch:
image
Moves to ON, system check confirm for installation and that's all folks. XD

I will check for another extension for tray (if there is any other working).

@DamirPorobic
Copy link
Member

Ok, had to restart but can reproduce now.

@DamirPorobic
Copy link
Member

This seems to be an issue in the Qt Component. If you call show just after showing the message box, everything works. So far I have been able to track it down to QMessageBox::question

I don't think that this makes much sense hunting down further. We will wait for new Qt version check if the issue persists.

@DamirPorobic
Copy link
Member

Does this issue still happen for you?

@hprmedina
Copy link
Contributor Author

Hi.. All works fine now, I tested all posible combinations and all are good. The bug is fixed.

Version: 1.8.1-continuous
Build: 1594-153cfb5

Using:
Qt5
X11
KDE Wayland
Gnome Wayland

@DamirPorobic
Copy link
Member

Nice, thanks for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants