Bug 340348 - xterm window icon is not drawn correctly
Summary: xterm window icon is not drawn correctly
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: 5.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://git.reviewboard.kde.org/r/121...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-26 00:44 UTC by John Lindgren
Modified: 2015-01-29 09:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
thomas.luebking: ReviewRequest+


Attachments
KDE screenshot (3.25 KB, image/png)
2014-10-26 00:44 UTC, John Lindgren
Details
XFCE screenshot (5.66 KB, image/png)
2014-10-26 00:44 UTC, John Lindgren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Lindgren 2014-10-26 00:44:11 UTC
The xterm window icon is not drawn correctly in the top left corner of the window.  The icon is drawn correctly in XFCE, so I am guessing that this is a bug in KWin rather than xterm.

Reproducible: Always

Steps to Reproduce:
Run xterm.

Actual Results:  
A few random colored pixels are drawn where the xterm icon should be.  See attached KDE screenshot.

Expected Results:  
The xterm icon should be drawn correctly as in XFCE.  See attached XFCE screenshot.

Arch Linux package versions are:
kwin 5.1.0.1-2
plasma-desktop 5.1.0.1-2
plasma-framework 5.3.1-1
xf86-video-intel 2.99.916-3
xterm 312-1
Comment 1 John Lindgren 2014-10-26 00:44:36 UTC
Created attachment 89325 [details]
KDE screenshot
Comment 2 John Lindgren 2014-10-26 00:44:55 UTC
Created attachment 89326 [details]
XFCE screenshot
Comment 3 Martin Flöser 2014-10-27 08:04:56 UTC
might also be a bug in kwindowsystem.
Comment 4 Thomas Lübking 2014-11-17 19:17:15 UTC
probably kwindowsystem

John, it would be great if you could try whether the patch fixes it for you as well.
Comment 5 John Lindgren 2014-11-18 01:20:15 UTC
The patch works for me.
Comment 6 Thomas Lübking 2015-01-17 17:19:50 UTC
Git commit 34c49b24920274455f2784b2ae6ac9108b226856 by Thomas Lübking.
Committed on 17/11/2014 at 19:09.
Pushed by luebking into branch 'master'.

simplify format selection, make 24bit rgb32

an image w/o alphachannel is certainly not
premultiplied

the findFormat() made not much sense at all
it was only used if the image depth was
the default depth and then looked up supported
16, 24 and 32 bit formats

However 32 bit images were handled before
unconditionally so this was only relevant for
16 bit images (where we supported either 5-6-5
or nothing) or 24bit images, where a false value
(ARGB_premultiplied implies 32bit) was returned.

IOW: for the majority of images (32bit) this was
not used, for 24bpp displays we got a falsely
colored images and for 16bpp either a correctly
colored (for 5-6-5 layouts) or no image at all
(for 5-5-5 or [4-]4-4-4 layouts)

I don't know whether 16bpp w/ 5-5-5 or 4-4-4 itw.,
but better show them miscolored images (and trigger
a bug) than none.
If there're funky 24bpp servers (other than 8-8-8)
somebody shall please report a bug to us.

Possible TODO:
add a single call to test the server layout (channel
masks) and yell an error if there's something "strange"

M  +8    -61   src/kxutils.cpp

http://commits.kde.org/kwindowsystem/34c49b24920274455f2784b2ae6ac9108b226856
Comment 7 Martin Flöser 2015-01-29 09:34:53 UTC
*** Bug 343501 has been marked as a duplicate of this bug. ***