Bug 363872 - Kate causes non-refreshing rectangle on second screen
Summary: Kate causes non-refreshing rectangle on second screen
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kxmlgui
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.22.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL: https://bbs.archlinux.org/viewtopic.p...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-03 02:03 UTC by deeenes
Modified: 2024-09-22 17:56 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description deeenes 2016-06-03 02:03:43 UTC
Versions:
Kate: 16.04.1
KDE Frameworks: 5.22.0
Qt: 5.6.0

I have an up-to-date Arch system, I use dwm as window manager (the dwm-pango AUR package, freshly compiled, launched by startx), and I use kate as my primary text editor. I have 2 or 3 screens beside the built in of the laptop, 2 attached by HDMI and VGA cables, I set up these with xrandr to extend the desktop. Recently I experience a rectangle on the second screen which fails to refresh, i.e. shows what was shown on that area before in some other windows, or black if there was an empty desktop before.

-- This rectangle is cca. 30 px high, 300 px wide, and positioned slightly left top direction from the middle of the screen.
-- It appears once I start kate, and does not disappear after.
-- I use kate on the second screen most of the time, but it does not matter on which screen I start kate.
-- The rectangle disappears and the window in focus refresh correctly if I switch the window into floating mode.
-- But once I go back to tiling or monocle mode, the rectangle comes back with its content from actual state of the window in focus, and it keeps showing this until it is overwritten the same way by a new floating window.
-- If I click on the rectangle by left button, kate's file open dialog pops up (despite kate is on an other virtual desktop); if I click by right button, some local menus of kate pop up, I don't know actually where are those menus in kate (show text, toolbar settings, etc).

-- I tried if dwm matters, I tested with gdm, gnome and cinnamon, and the rectangle appears in those WMs as well.
-- I tested if the VGA/HDMI connection matters, but the rectangle is there with both.
-- I tested if the screen matters trying with 2 different screens with different resolutions, and the rectangle is always there.

Here is a screenshot of the box, showing part of Kate editing area and covering a terminal window:
https://i.imgsafe.org/0e4b0e784a.png

I also have a permanent crash issue on disconnecting the second screen, I will file another bug report as that might be independent from this.

Reproducible: Always

Steps to Reproduce:
1. start Xorg by either startx --> dwm or gdm --> cinnamon
2. execute xrandr to use 2 screens, e.g. xrandr --output eDP1 --mode 1366x768 --pos 0x0 --output HDMI1 --mode 2560x1440 --pos 1366x0
3. start Kate, set it to the 2nd screen

Actual Results:  
the rectangle appears, and present over any other windows on any other virtual desktops on 2nd screen

Expected Results:  
refreshing the whole screen, do not cover anything outside its own window area

This issue I posted before to the Arch Linux forum, and decided to post here because got no answer, and it is apparently related to Kate:
https://bbs.archlinux.org/viewtopic.php?pid=1630551#p1630551

I really want to keep editing with Kate, changing editors is lots of trouble, so I am happy to recompile and test if that helps.
Comment 1 Dominik Haumann 2016-06-03 16:48:54 UTC
What happens, if you CTRL+ALT+ESC (xkill) the rectangle? Does it kill kate then, too? Could also be some strange graphics driver bug.
Comment 2 deeenes 2016-06-03 21:16:11 UTC
(In reply to Dominik Haumann from comment #1)
> What happens, if you CTRL+ALT+ESC (xkill) the rectangle? Does it kill kate
> then, too? Could also be some strange graphics driver bug.

That's interesting: ctrl+alt+esc does not work for me at all, but xkill command with clicking on a window I can kill any X application. On the rectangle it has no effect, neither it kills the window covered by the rectangle. Clicking on regular Kate window kills Kate. The rectangle also has no window border.
Comment 3 deeenes 2016-06-03 21:19:49 UTC
(In reply to Dominik Haumann from comment #1)
> What happens, if you CTRL+ALT+ESC (xkill) the rectangle? Does it kill kate
> then, too? Could also be some strange graphics driver bug.

I have Intel i915 graphics driver, version 1:2.99.917+654+ga508b11 and Xorg 1.18.3
Comment 4 Dominik Haumann 2016-06-04 09:16:54 UTC
Hm, does it also happen in KWrite? What, if you disable all plugins? What, if you work with Kate and use the features (CTRL+F, CTRL+G, perform spell checking etc), does it maybe then go away?

It is hard to tell whether this is a Kate/KWrite/KDE bug, since if we do not know how to reproduce, we can't really do anything about it.

The easiest thing is to see whether the next update to KF 5.23 and Qt 5.6.1 and maybe the next plasma version will fix it...
Comment 5 deeenes 2016-06-04 18:46:52 UTC
(In reply to Dominik Haumann from comment #4)
> Hm, does it also happen in KWrite? What, if you disable all plugins? What,
> if you work with Kate and use the features (CTRL+F, CTRL+G, perform spell
> checking etc), does it maybe then go away?
> 
> It is hard to tell whether this is a Kate/KWrite/KDE bug, since if we do not
> know how to reproduce, we can't really do anything about it.
> 
> The easiest thing is to see whether the next update to KF 5.23 and Qt 5.6.1
> and maybe the next plasma version will fix it...

Hi Dominik, I think I could resolve the issue, following your suggestions. Thank you so much!

-- The rectangle does not appear with KWrite.
-- Deactivating plugins does not matter, neither ctrl+f, ctrl+g, etc, anyways I use these very often.
-- This issue is with me since end of last year, KF 5.1x and Qt 5.4, so I am sceptic the new release would resolve.
-- I started kate with a new session, and the main toolbar appeared in place of the rectangle (see here: http://i.imgsafe.org/31f82477cb.png). So the rectangle was the toolbar itself, but has never shown the toolbar content, but the editing space. This is confirmed by that if I clicked on the rectangle, it was like I clicked on the toolbar, i.e. file open dialog, configure toolbar, etc. popped up (from this I could already guess). The rectangle could be removed by choosing "Unlock toolbar" and then uncheck "Show toolbar" from the local menu.

Thanks again for your suggestions!

Nevertheless I think there is some bug behind this, as the box should have shown the toolbar, and don't cover other windows, as a normal toolbar should remain its parent application.
Comment 6 Dominik Haumann 2016-06-05 12:11:33 UTC
Interesting, so I believe this is an issue in KXMLGUI that, if a toolbar is hidden by default (was never shown), a proper reparent is probably missing and we get this artifact. I don't think this is an issue in Kate itself. Therefore, reassigning to kxmlgui (maybe also kparts issue?).
Comment 7 Christoph Cullmann 2024-09-22 17:56:20 UTC
I can not reproduce that, please try a recent Qt 6 based release.