ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.6k stars 598 forks source link

[HL:BS] Window icon is upside-down #970

Closed roman-bronis closed 11 years ago

roman-bronis commented 11 years ago

Screenshot: bs

xprop:

_NET_WM_ICON_GEOMETRY(CARDINAL) = 5, 159, 40, 35
XKLAVIER_STATE(INTEGER) = 0, 0
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_STICK, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MOVE, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_FULLSCREEN
_NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 23, 4
_NET_WM_DESKTOP(CARDINAL) = 0
_FLUXBOX_GROUP_LEFT(WINDOW): window id # 0x0
_NET_WM_ICON(CARDINAL) =    Icon (16 x 16):
     ░        ░░░  ░
         ██████     
       ██▓▒▒▒▒▓██   
      █▓░░░░░░░▒▓█  
     █▓░░░░░░░░░░▓█ 
     █░▒█▓░░░▒█▓▒░█ 
    █▓░░▓█▒░░▓█▓▓░▓█
    █▒░░░██░░█▓░░░▒█
    █▒░░░▒█▓▒█▒░░░▒█
    █░░░░░▓██▓░░░░▒█
    █▒░░░░▒██▒░░░░▒█
    █▓░░░░░▓█░░░░░▓█
     █░░░▒▒█▓░░░░░█ 
     █▓░░▒██▒░░░░▓█ 
      █▓░░░░░░░░▓█  
       ██▓▒░░▒▓██   

_NET_WM_NAME(UTF8_STRING) = "Blue Shift"
WM_NAME(STRING) = "Blue Shift"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 395
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLASS(STRING) = "hl_linux", "hl_linux"
WM_HINTS(WM_HINTS):
        Client accepts input or input focus: True
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        user specified location: 0, 0
WM_CLIENT_MACHINE(STRING) = "guest-pc"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0
ghost commented 11 years ago

Confirmed, +1.

johndrinkwater commented 11 years ago

Seems the tga has ‘origin: bottom left’ set and whatever goldsrc uses to read tgas fails to cope; resaving it as origin: top left makes it work correctly. It’s also 16×16 unlike the other games -

john@joran ~/Steam/SteamApps/common/Half-Life > file */game.tga
bshift/game.tga:   Targa image data - RGB 16 x 16
cstrike/game.tga:  Targa image data - RGB - RLE 32 x 32
czero/game.tga:    Targa image data - RGB - RLE 32 x 32
dmc/game.tga:      Targa image data - RGB - RLE 32 x 32
dod/game.tga:      Targa image data - RGB - RLE 32 x 32
gearbox/game.tga:  Targa image data - RGB - RLE 32 x 32
ricochet/game.tga: Targa image data - RGB - RLE 32 x 32
tfc/game.tga:      Targa image data - RGB - RLE 48 x 48
valve/game.tga:    Targa image data - RGB - RLE 32 x 32

In looking into it, all icons being set are gaining an extra line of transparency so the icon has the bottom row of pixels cropped-

_NET_WM_ICON(CARDINAL) =    Icon (32 x 32):

                ░▒▓▓▓▓▒░            
             ▓████████████▓         
           ░▓███▓▓▒▒▒▒▓▓███▓░       
         ░▓██▓▒░░░░░░░░░░▒▓██▓░     
         ▓██▓░░░░░░░░░░░░░░▓██▓     
       ░▓█▓░░░░▒▒▒▒▒▒░░░░░░░░██▓░   
       ▓█▓▒░░░░▓▓▓▓▓▓░░░░░░░░▒██▓   
      ░██░░░░░░▓█████░░░░░░░░░░██░  
      ▓█▓░░░░░░▓▓▓███░░░░░░░░░░▓█▓  
     ▓█▓░░░░░░░░░░▓██▓░░░░░░░░░░▓█▓ 
     ██▒░░░░░░░░░░▒██▓▒░░░░░░░░░▒██ 
     ██░░░░░░░░░░░▒███▓░░░░░░░░░░██ 
    ░█▓░░░░░░░░░░▒▓███▓░░░░░░░░░░▓█░
    ▒█▓░░░░░░░░░░▓█████░░░░░░░░░░▓█▒
    ▓█▒░░░░░░░░░░██████▒░░░░░░░░░▓█▓
    ▓█▒░░░░░░░░▒▓██▓▓██▓▒░░░░░░░░▒█▓
    ▓█▒░░░░░░░░▓███▓▒███▒░░░░░░░░▒█▓
    ▓█▓░░░░░░░░████░░▓██▓░░░░░░░░▓█▓
    ▒█▓░░░░░░░▒███▓░░▓███░░░░░░░░▓█▒
    ░█▓░░░░░░▓███▒░░░▒▓██▒░▒▒░░░░██░
     ██░░░░░░▓███▒░░░░▓██▓▒▓▓░░░░██ 
     ██▒░░░░▒███▓░░░░░▒██████░░░▒██ 
     ▓█▓░░░▒▓██▓▒░░░░░░██████▒░▒▓█▓ 
      ▓█▓░░▒▓▓▓░░░░░░░░▓█▓▓▒░░░▓█▓  
      ░██░░░░░░░░░░░░░░▒▒░░░░░▒██░  
       ▓██▓░░░░░░░░░░░░░░░░░░▓██▓   
       ░▓██░░░░░░░░░░░░░░░░░▒██▓░   
         ▓██▓▒░░░░░░░░░░░░▒▓██▓     
         ░▓██▓▒░░░░░░░░░░▒▓██▓░     
           ░▓████▓▓▓▓▓▓████▓░       
             ▓████████████▓         

_NET_WM_NAME(UTF8_STRING) = "Blue Shift"
johndrinkwater commented 11 years ago

See how its lower than the rest, Screenshot from 2013-04-08 00:15:06

ghost commented 11 years ago

It isn't that hard to extract 48x48 icon from game.ico and save as 32 BPP TGA with RLE compression and FLIPPED flag, then.

johndrinkwater commented 11 years ago

@FrenchMan I did that already to test the problem, see my xprop output ;P

ghost commented 11 years ago

@johndrinkwater Well, your icon is 32x32, so nope, you didn't ;PP

roman-bronis commented 11 years ago

Ok. so will this be fixed?