Wrong window dimensions when using native title bar


#1

Just launch the juce demo, and toggle the “use native window title bar” option. The window gets resized , and is now slightly higher and wider (easy to spot with the checkerboard background)

Commenting the windowBorder stuff in LinuxComponentPeer::setBounds seems to fix that:

XMoveResizeWindow (display, windowH, wx,// - windowBorder.getLeft(), wy,// - windowBorder.getTop(), ww,// + windowBorder.getLeftAndRight(), wh);// + windowBorder.getTopAndBottom());


#2

Ok, that makes sense, but probably also needs a change to the values passed to XSetWMNormalHints just before that?


#3

mm right I did not notice this one…

I just checked and it does not seem to make a difference !

(I have tested only on gnome’s windowmanager metacity)


#4

I think it might be used by KDE, but don’t know whether it should have the window border added or not!


#5

I just tested with kde 4.2, commenting the borders in the sizehints part does not seem to cause any problem !