But you don't know it, that's the thing. I'm saying that third party applications can change the title. Yes I can store a string with the title I last applied to the window, but if if something like a sandbox appends "SomeTitle <sandboxie>" to the end, then I need a way to get that new title, which I have no control over.
Ok I get it. But:
- this is unreliable, what happens to your log if one of the sandboxes doesn't add its name to the window title? to me you should handle this yourself, to get consistent results
- it still doesn't convinces me (this is a very very very specific use case...)
Not really, it can be used in almost any logging/debugging use case. If I am working with pure SFML windows and want to know the title name for a quick log, I'm SOL. I'd have to wrap the window and hold a string, which is cluttered and goes against many designing rules/theories anyway (i.e.
don't store data that can be easily obtained somewhere else). I think this applies.
Further, this is just such a small, simple thing that really should be in there. It just doesn't seem like a complete class without a getter such as this.
Rewrite tiny part of sfml yourself? This is extremely niche feature.
Or write an external function that uses window.getSystemHandle(), with one implementation per target OS.
But then that requires the extra time for
each project to write/implement/create a wrapper for something that
should already be implemented in a native window class!!