Attached is a patch that enables building on OS X. Everything seems to work except
- the theme cannot be used in pure Qt applications, probably due to a bug in QWidget::setMask (all rounded corners have black rectangles superposed)
- the blurring in inactive text/widgets looks horrible
- the title text of dock windows with vertical titlebars is not rotated but printed within the titlebar's width instead (i.e. "extreme overstrike").
- The presets dialog has 2 entries at startup that cannot be deleted and carrying names that hint at a null pointer dereference or some similar bug.
Sorry for the delay and thanks for the patch.
Two questions:
- does "find_package(X11)" actually cause any trouble on OSX?
- why do you seek to disable ARGB support on OSX by default? Is it broken? (thus should be fixed or the option fixed to "OFF")
On the comments:
- all rounded corners have black rectangles superposed
This should be no problem is ARGB windows are enabled, since the window is then not masked but the corners are just transparent (and antialiased)
the blurring in inactive text
It's not really blurred - the text is painted several times (this is legacy behavior. Painting texts on images, blurring and then esp. uploading the image to the X11 server over and over again would have been quite some overhead before the raster graphicssystem was introduced (iirc 4.6) or turned default (4.8)
Since Bespin is EOL, that won't change, but there's a "hidden" config key to change the appearance of disabled text in general:
StrikeDisabled=true
the title text of dock windows with vertical titlebars
The entire docktitle is not aware of the vertical character (since I was not aware that the feature exists ;-)
-> gonna fix
The presets dialog has 2 entries at startup
Can you please provide a screenshot (and/or entry strings)?
On Friday October 10 2014 20:10:05 Thomas Luebking wrote:
It might, because most of us (using FOSS via MacPorts or otherwise) will have X11 installed, so its presence cannot be taken as an indication that the build should be for X11.
Compositing is broken in Qt; the Oxygen and Breeze styles suffer from that too. And that's even with Qt forced to raster rendering.
But to be honest, I simply removed support for translucent windows because I have no use for those esp. when I see a remark about performance suffering (apart from coupling opacity to a moderator+scrollwheel to peek behind a window without moving/minimising it, but I doubt that'd work on OS X).
EDIT: I was right in doubting this'd work: the ARGB code invokes X11 functionality.
Yes, and somehow this works in KDE but not in pure Qt applications, even without those translucent windows...
Good to know - where/how do I set it?
Heh, guess that proves you don't use KDevelop
I'll post a screenshot, and an export of one of the entries.
BTW, I know it's off-topic, but here's a strange backtrace - a null *this pointer, that should never happen, right?
Last edit: R.J.V. Bertin 2014-10-10
You may try polish.cpp:525
- #if BESPIN_ARGB_WINDOWS
+ #if 1
bespin write style StrikeDisabled true
This adds the key to the [Style] section (~/.config/Bespin/Style.conf)
On Saturday October 11 2014 12:15:47 Thomas Luebking wrote:
Well, damn if it doesn't build fine now... I'm sure that the error I got led me to a section where translucency was obtained with a number of calls to XProperty.
Yes, I does. How's that not a compositing error?
Tried that, and since ARGB mode apparently is possible after all, I tried that too. No luck...
I just set the default to True on OS X ;)
QSettings are stored in a very different manner on OS X, all together in a big com.trolltech plist. Which means I can't throw away Store.conf. But that isn't actually necessary. I never had Bespin on my system before, and those entries were there the very 1st time I started the bespin application. They also come back when I delete them.
I had KDevelop running while I switched styles a couple of times. I think this crash happened when I quit KDevelop, possibly because it had retained the bespin style rather than changing to the new style. I'm sorry, this is very sloppy, I should have described the circumstances of the crash or not upload the trace at all :-/
René.
Does it happen with "bespin demo -graphicssystem raster"?
On Sunday October 12 2014 08:23:06 Thomas Luebking wrote:
I wasn't claiming where the error was ;)
It's known that Qt's compositing is ... wonky on OS X.
Well, it does indeed NOT happen in qtconfig's preview when I launch it in raster mode!
I'm guessing that's a mode one has to select as early as possible, so it couldn't be done in the bespin code itself?
Of course. But that would mean I'd have to run the theme for a while. I don't think it'd be my definite choice, but I could do that out of altruism, now that the other issues have been addressed ;)
Thx!
Nope - has to be done before the QApplication constructor is called, what is always before the QStyle is loaded in all real-case scenarios.
When Bespin knows that it's in use, it's already too late. (Also you say other style are affected as well)
The order to determine the graphcissystem is:
the application commandline -graphicssystem switch
QApplication::setGraphicsSystem()
the QT_GRAPHICSSYSTEM environment variable
the Qt configure -graphicssystem switch
ie. if "QT_GRAPHICSSYSTEM=raster bespin demo" does not work, this means some Qt code really calls "setGraphicsSystem("native")" on OSX...
If it would work, this would only mean that the compile switch is chosen "badly" -> compile Qt with "-graphicssystem raster" and/or ensure to call "export QT_GRAPHICSSYSTEM=raster" in /etc/profile or similar.
(Ian and me actually had this topic somewhen in the past because the KDE Games apparently perform horrible on the native graphicssystem on OSX)
Setting QT_GRAPHICSSYSTEM does work, so nobody does a "bad call". I do think that KDE has indeed been patched to set raster mode.
When I built Qt with raster mode on by default certain (pure Qt) applications I use started crashing, which they don't appear to do when using the env. variable.
Setting bespin through qtconfig with QT_GRAPHICSSYSTEM set to raster works, but when I relaunch qtconfig (or any other Qt app), the blocks are back. This does not apply to the Oxygen and Breeze themes. How weird is that??
What's "the Qt configure -graphicssystem switch" ?
Last edit: R.J.V. Bertin 2014-10-12
The environment affects the called application - it has NO impact for changing the style or similar, ie.
QT_GRAPHICSSYSTEM=raster qtconfig # qtconfig running on raster graphicssystem
[set style]
qtconfig # qtconfig does NOT magically run on the raster graphicssystem
Assuming bash:
export QT_GRAPHICSSYSTEM=raster # now set for all processes LAUNCHED FROM THIS SHELL
Ahem, think I didn't know that? :P
I may be a tcsh user, but I've known the setenv command since, oh, 1989 or so ... O:^)
To be more specific:
1> setenv QT_GRAPHICSSYSTEM raster
2> qtconfig # select bespin, works fine
3> qgit # some other Qt app, WTF, looks blocky!
4> qtconfig # yup, looks blocky, switch to some other style, back to bespin, ok, looks fine
5> # loop back to 3>
I've a suspicion here - there is or used to be a bug in the raster graphicssystem (it "forgets" the alpha channel) which I work around.
However, the raster engine detection does not take place on non OSX (no xrender) systems - i could assume QT_NO_XRENDER is defined in your config.
For a quick test, blib/FX.cpp:222
- static bool useRaster = false;
+ static bool useRaster = true;
PS: sorry for treating you like an OSX user. You know, we believe you only use a virtual keyboard with the single buttoned mouse and such ... ;-P
Revision 1730 has CMakeLists patches that should be sufficient - I omitted the "not apple" test around the X11/XRender_found tests (should be superfluous) and instead of altering the option defaults, hint that they're only relevant on X11/KWin.
I'll close this patch, please open a bug with your findings on the spurious config key issue.