gladhorn (Frederik Gladhorn)
User

Projects (11)

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Wednesday

  • Clear sailing ahead.

User Details

User Since
Jul 27 2015, 2:36 PM (211 w, 6 d)
Availability
Available

Recent Activity

Fri, Aug 16

gladhorn added a comment to D23144: Port from QFontMetrics::width() to boundingRect().width().

Yes, so for size hints, this should be fine. For actually placing individual chars and calculating their width in the terminal window I didn't dare changing things.

Fri, Aug 16, 5:42 PM · Konsole

Wed, Aug 14

gladhorn committed R108:1296ad39865c: Remove custom menu positioning code (authored by gladhorn).
Remove custom menu positioning code
Wed, Aug 14, 9:50 AM
gladhorn closed D23142: Remove custom menu positioning code.
Wed, Aug 14, 9:50 AM · KWin
gladhorn added a comment to D23144: Port from QFontMetrics::width() to boundingRect().width().

See also https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/

Wed, Aug 14, 7:53 AM · Konsole
gladhorn requested review of D23144: Port from QFontMetrics::width() to boundingRect().width().
Wed, Aug 14, 7:49 AM · Konsole
gladhorn requested review of D23143: Use QCommandLineOption::HiddenFromHelp instead of deprecated API.
Wed, Aug 14, 7:46 AM · Konsole
gladhorn committed R108:25ec024ab591: Use compiler __SSE2__ definitions and C++11 alignas (authored by gladhorn).
Use compiler __SSE2__ definitions and C++11 alignas
Wed, Aug 14, 7:31 AM
gladhorn closed D23120: Use compiler __SSE2__ definitions and C++11 alignas.
Wed, Aug 14, 7:31 AM · KWin
gladhorn requested review of D23142: Remove custom menu positioning code.
Wed, Aug 14, 7:31 AM · KWin

Tue, Aug 13

gladhorn updated the diff for D23120: Use compiler __SSE2__ definitions and C++11 alignas.

Use #if defined consistently

Tue, Aug 13, 7:40 PM · KWin
gladhorn added a comment to D23120: Use compiler __SSE2__ definitions and C++11 alignas.
In D23120#511135, @zzag wrote:

There seem to be frequent crashes in the quad version of this code, but
this change should not make any difference from what I can tell.

I doubt that kwin crashes because of alignment issues. I suggest looking into whether GLVertexBuffer::streamingBuffer() is still valid.

Tue, Aug 13, 7:35 PM · KWin
gladhorn committed R108:ce404f52a80f: Use C++ cast instead of c-style (authored by gladhorn).
Use C++ cast instead of c-style
Tue, Aug 13, 6:43 AM
gladhorn closed D23121: Use C++ cast instead of c-style.
Tue, Aug 13, 6:43 AM · KWin
gladhorn added inline comments to D23102: Reduce duplicate code calculating popup position.
Tue, Aug 13, 6:41 AM · KWin
gladhorn committed R108:0a5b029a391f: Reduce duplicate code calculating popup position (authored by gladhorn).
Reduce duplicate code calculating popup position
Tue, Aug 13, 6:39 AM
gladhorn closed D23102: Reduce duplicate code calculating popup position.
Tue, Aug 13, 6:39 AM · KWin
gladhorn added a reviewer for D23120: Use compiler __SSE2__ definitions and C++11 alignas: KWin.
Tue, Aug 13, 6:32 AM · KWin
gladhorn added a comment to D23121: Use C++ cast instead of c-style.

This is interesting, since it's around the corner from this crash: https://bugs.kde.org/show_bug.cgi?id=399499 - But of course this patch won't change anything, just make it slightly easier to see what's going on.

Tue, Aug 13, 6:32 AM · KWin
gladhorn added a reviewer for D23121: Use C++ cast instead of c-style: KWin.
Tue, Aug 13, 6:31 AM · KWin
gladhorn requested review of D23121: Use C++ cast instead of c-style.
Tue, Aug 13, 6:30 AM · KWin
gladhorn requested review of D23120: Use compiler __SSE2__ definitions and C++11 alignas.
Tue, Aug 13, 6:23 AM · KWin
gladhorn added inline comments to D23067: Clean up usage of m_client.
Tue, Aug 13, 6:21 AM · KWin
gladhorn added a comment to D23069: Remove disabled TabGroup feature.

Just for the record: the patch to add window decoration back is in D13459 - I still have the code around and uncommitted changes on top. With the relatively small changes I had window tabs kind of working already. So if anyone wants to pick it up: we are almost there and I'm happy to share the code. Personally I doubt that I will find the time to finish it. I currently don't even find the time to push accepted changes. I'd love to do it, but I must be realistic.

On this change: we also have window tabs in the window rule system and also in the configuration system (e.g. middle click to move tabs).

Tue, Aug 13, 6:17 AM · KWin

Mon, Aug 12

gladhorn added a comment to D23102: Reduce duplicate code calculating popup position.

Hi @romangg, I did not test this. I added inline comments explaining why the code is completely unchanged. It does 100% the same as before, just without the duplication. All you need is to invert the two conditions inside the ifs and switch the else branch with the first branch of the if and you'll arrive at this.

Mon, Aug 12, 6:48 AM · KWin

Sun, Aug 11

gladhorn updated the diff for D23102: Reduce duplicate code calculating popup position.

Remove locals.

Sun, Aug 11, 8:18 PM · KWin
gladhorn committed R108:75e96010a305: Move common code out of if/else (authored by gladhorn).
Move common code out of if/else
Sun, Aug 11, 8:15 PM
gladhorn closed D23101: Move common code out of if/else.
Sun, Aug 11, 8:15 PM · KWin
gladhorn committed R108:12886cf442fe: Be consistent about touch point id type: use qint32 (authored by gladhorn).
Be consistent about touch point id type: use qint32
Sun, Aug 11, 8:15 PM
gladhorn closed D23086: Be consistent about touch point id type: use qint32.
Sun, Aug 11, 8:15 PM · KWin
gladhorn added a reviewer for D23101: Move common code out of if/else: KWin.
Sun, Aug 11, 7:56 PM · KWin
gladhorn added a reviewer for D23102: Reduce duplicate code calculating popup position: KWin.
Sun, Aug 11, 7:56 PM · KWin
gladhorn requested review of D23102: Reduce duplicate code calculating popup position.
Sun, Aug 11, 7:55 PM · KWin
gladhorn requested review of D23101: Move common code out of if/else.
Sun, Aug 11, 7:55 PM · KWin
gladhorn added a comment to D23069: Remove disabled TabGroup feature.

OK, now this should apply :)

Sun, Aug 11, 7:53 PM · KWin
gladhorn committed R108:ed4a9d756aab: Clean up usage of m_client (authored by gladhorn).
Clean up usage of m_client
Sun, Aug 11, 7:08 PM
gladhorn closed D23067: Clean up usage of m_client.
Sun, Aug 11, 7:08 PM · KWin
gladhorn updated the diff for D23067: Clean up usage of m_client.

Put the check back for now, we spin a nested event loop. Let's remove the check in an independent patch - if at all.

Sun, Aug 11, 6:41 PM · KWin
gladhorn updated the diff for D23067: Clean up usage of m_client.

Also add curly braces.

Sun, Aug 11, 6:35 PM · KWin
gladhorn updated the diff for D23067: Clean up usage of m_client.

Removed to nullptr checks - after testing manually, I cannot get it to crash with the close menu entry, so I assume this is fine indeed.

Sun, Aug 11, 6:34 PM · KWin
gladhorn added a comment to D23086: Be consistent about touch point id type: use qint32.

I played with this after spending some time to get a working wayland session. I could not see any problems, decorations work, the touch point visualization also works.

Sun, Aug 11, 6:27 PM · KWin
gladhorn added inline comments to D23067: Clean up usage of m_client.
Sun, Aug 11, 6:24 PM · KWin
gladhorn added a comment to D23069: Remove disabled TabGroup feature.

The patch should apply cleanly on top of https://phabricator.kde.org/D23067

Sun, Aug 11, 6:15 PM · KWin
gladhorn updated the diff for D23086: Be consistent about touch point id type: use qint32.

Fix up commit message

Sun, Aug 11, 2:29 PM · KWin
gladhorn added a comment to D23067: Clean up usage of m_client.

I hope this is now making the code slightly easier to read, without changing the functionallity, except for shuffling things around a tiny bit where we discussed. It also adds a few extra checks, to play safe with the smart pointers. These nullptr checks are extremely cheap.

Sun, Aug 11, 2:26 PM · KWin
gladhorn committed R108:969403b35fe5: Make iterating over Layer enum simple (authored by gladhorn).
Make iterating over Layer enum simple
Sun, Aug 11, 2:23 PM
gladhorn closed D23085: Make iterating over Layer enum simple.
Sun, Aug 11, 2:23 PM · KWin
gladhorn added a comment to D23086: Be consistent about touch point id type: use qint32.
In D23086#510314, @zzag wrote:

Someone "fixed" these warnings a while ago, but you reverted the fix.

I know. I reverted because it broke functionality. So there was no fix.

This makes sense because libinput provides (non-negative) int32 ids/slots.

Even if it makes sense, the warnings have to be fixed. Comparing signed and unsigned numbers without taking extra measures is bad.

"This makes sense" as in this fix here. If libinput would provide uint32 ids it would not make sense.

Sun, Aug 11, 2:22 PM · KWin
gladhorn updated the diff for D23085: Make iterating over Layer enum simple.

Removed, cast, made if one line.

Sun, Aug 11, 2:11 PM · KWin
gladhorn added a comment to D23085: Make iterating over Layer enum simple.
In D23085#510297, @zzag wrote:

to iterate over the enum, is mostly confusing

I actually find it a bit cool because we're iterating through layers, but yeah this part can be simpler. :-)

Sun, Aug 11, 2:02 PM · KWin
gladhorn committed R108:dd944b2d5e82: Fix warning: -Wdeprecated-copy - implement StrutRect::operator= (authored by gladhorn).
Fix warning: -Wdeprecated-copy - implement StrutRect::operator=
Sun, Aug 11, 2:00 PM
gladhorn closed D23084: Fix warning: -Wdeprecated-copy - implement StrutRect::operator=.
Sun, Aug 11, 2:00 PM · KWin
gladhorn committed R108:e6ad8786da1d: Be consistent in undefining macros (authored by gladhorn).
Be consistent in undefining macros
Sun, Aug 11, 10:10 AM
gladhorn closed D23083: Be consistent in undefining macros.
Sun, Aug 11, 10:10 AM · KWin
gladhorn requested review of D23086: Be consistent about touch point id type: use qint32.
Sun, Aug 11, 9:53 AM · KWin
gladhorn requested review of D23085: Make iterating over Layer enum simple.
Sun, Aug 11, 9:53 AM · KWin
gladhorn committed R108:99c231830189: Remove stray semicolon (authored by gladhorn).
Remove stray semicolon
Sun, Aug 11, 9:52 AM
gladhorn requested review of D23084: Fix warning: -Wdeprecated-copy - implement StrutRect::operator=.
Sun, Aug 11, 9:51 AM · KWin
gladhorn requested review of D23083: Be consistent in undefining macros.
Sun, Aug 11, 9:50 AM · KWin
gladhorn updated the diff for D23069: Remove disabled TabGroup feature.

Also removed shortCaption which was only used by tab group.

Sun, Aug 11, 7:42 AM · KWin
gladhorn updated the diff for D23069: Remove disabled TabGroup feature.

Fix up a few more places (mostly isCurrentTab related)

Sun, Aug 11, 7:29 AM · KWin
gladhorn added inline comments to D23069: Remove disabled TabGroup feature.
Sun, Aug 11, 7:15 AM · KWin

Sat, Aug 10

gladhorn updated the diff for D23069: Remove disabled TabGroup feature.

Restored tabbox code

Sat, Aug 10, 8:00 PM · KWin
gladhorn added a comment to D23069: Remove disabled TabGroup feature.
In D23069#509945, @zzag wrote:

You overlooked _KDE_NET_WM_TAB_GROUP in atoms.cpp.

Sat, Aug 10, 7:59 PM · KWin
gladhorn added inline comments to D23069: Remove disabled TabGroup feature.
Sat, Aug 10, 7:32 PM · KWin
gladhorn committed R119:ebb1178590a6: Fix typo (authored by gladhorn).
Fix typo
Sat, Aug 10, 7:13 PM
gladhorn committed R119:6fc4643bee99: Cleanup mix of tabs and spaces (authored by gladhorn).
Cleanup mix of tabs and spaces
Sat, Aug 10, 7:13 PM
gladhorn committed R119:c7bc95508898: Minor simplification (authored by gladhorn).
Minor simplification
Sat, Aug 10, 7:13 PM
gladhorn committed R119:6a45d01844a1: Turn LayoutUnit into a regular class (authored by gladhorn).
Turn LayoutUnit into a regular class
Sat, Aug 10, 7:13 PM
gladhorn committed R119:cb0e3442fd7f: Prefer .at over [] for QList (authored by gladhorn).
Prefer .at over [] for QList
Sat, Aug 10, 7:13 PM
gladhorn committed R119:b1212333fba5: Use C++ cast instead of c-style (authored by gladhorn).
Use C++ cast instead of c-style
Sat, Aug 10, 7:13 PM
gladhorn committed R119:e08bb5a6140d: Add missing const ref in foreach (authored by gladhorn).
Add missing const ref in foreach
Sat, Aug 10, 7:13 PM
gladhorn committed R119:86f3a5e78657: Implement operator= for LayoutUnit (authored by gladhorn).
Implement operator= for LayoutUnit
Sat, Aug 10, 7:13 PM
gladhorn closed D23043: Include xkb.h.
Sat, Aug 10, 7:10 PM · Plasma
gladhorn committed R119:5ea41a794f68: Include xkb.h (authored by gladhorn).
Include xkb.h
Sat, Aug 10, 7:10 PM
gladhorn committed R119:937a0cedf227: When implementing assignment, also implement copy ctor (authored by gladhorn).
When implementing assignment, also implement copy ctor
Sat, Aug 10, 7:09 PM
gladhorn closed D23042: When implementing assignment, also implement copy ctor.
Sat, Aug 10, 7:09 PM · Plasma
gladhorn updated the diff for D23069: Remove disabled TabGroup feature.

Attempt to remove entire tabgroup feature.

Sat, Aug 10, 6:55 PM · KWin
gladhorn updated the diff for D23067: Clean up usage of m_client.

Removed first nullptr check

Sat, Aug 10, 6:37 PM · KWin
gladhorn added inline comments to D23067: Clean up usage of m_client.
Sat, Aug 10, 6:36 PM · KWin
gladhorn added a comment to D23070: Remove usage of QWeakPointer for QObject for thumbnails.

Ok, I believe I got it now. The QWeakPointer constructer should get either passed a QSharedPointer or QWeakPointer as argument. But here we just pass the QObject EffectWindowImpl. Thanks for explaining.

Sat, Aug 10, 2:25 PM · KWin
gladhorn committed R108:00daa8a07e3c: Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent (authored by gladhorn).
Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent
Sat, Aug 10, 2:25 PM
gladhorn closed D23071: Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent.
Sat, Aug 10, 2:25 PM · KWin
gladhorn committed R108:348232e68278: Remove usage of QWeakPointer for QObject for thumbnails (authored by gladhorn).
Remove usage of QWeakPointer for QObject for thumbnails
Sat, Aug 10, 2:24 PM
gladhorn closed D23070: Remove usage of QWeakPointer for QObject for thumbnails.
Sat, Aug 10, 2:24 PM · KWin
gladhorn added a comment to D23070: Remove usage of QWeakPointer for QObject for thumbnails.

See https://phabricator.kde.org/D23065

Using a QWeakPointer for QObjects works, but has been deprecated for around seven years. QPointer does the same cleanly (track life-time of QObjects). If you use .toStrongRef() on a QWeakPointer to a QObject without going through QSharedPointer you are in UB land.
In other words: this API is bad and will most likely be removed from Qt in the future.

Thanks for the explanation. With "except in this one case" in the description you mean which case? Using it on QObjects? The API will most likely be removed, this means the whole concept of QWeakPointer?

Sat, Aug 10, 12:13 PM · KWin
gladhorn updated the diff for D23070: Remove usage of QWeakPointer for QObject for thumbnails.

better commit message

Sat, Aug 10, 11:32 AM · KWin
gladhorn updated the diff for D23071: Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent.

improve commit message

Sat, Aug 10, 11:30 AM · KWin
gladhorn added a comment to D23070: Remove usage of QWeakPointer for QObject for thumbnails.

And that's exactly it: there is no QSharedPointer involved here at all.

Sat, Aug 10, 11:28 AM · KWin
gladhorn added a comment to D23070: Remove usage of QWeakPointer for QObject for thumbnails.

See https://phabricator.kde.org/D23065

Sat, Aug 10, 11:28 AM · KWin
gladhorn added inline comments to D23067: Clean up usage of m_client.
Sat, Aug 10, 11:25 AM · KWin
gladhorn added a reviewer for D21203: Accessibility improvements: Konsole.
Sat, Aug 10, 10:54 AM · Konsole
gladhorn updated the diff for D23071: Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent.

Improve commit message

Sat, Aug 10, 10:53 AM · KWin
gladhorn updated the diff for D23070: Remove usage of QWeakPointer for QObject for thumbnails.

Fix commit message

Sat, Aug 10, 10:51 AM · KWin
gladhorn closed D23068: Fix ifdefs resulting in dead code.
Sat, Aug 10, 10:27 AM · KWin
gladhorn committed R108:ef670c3648bf: Fix ifdefs resulting in dead code (authored by gladhorn).
Fix ifdefs resulting in dead code
Sat, Aug 10, 10:27 AM
gladhorn added a comment to D23069: Remove disabled TabGroup feature.

I just removed the obviously dead bits behind an if (false). If someone wants to bring it back, it's always in the git history. I don't care either way, but to me reducing lines of code is generally a good thing.

Sat, Aug 10, 10:19 AM · KWin
gladhorn requested review of D23071: Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent.
Sat, Aug 10, 10:16 AM · KWin
gladhorn added a reviewer for D23070: Remove usage of QWeakPointer for QObject for thumbnails: KWin.
Sat, Aug 10, 10:06 AM · KWin
gladhorn added a reviewer for D23069: Remove disabled TabGroup feature: KWin.
Sat, Aug 10, 10:06 AM · KWin
gladhorn requested review of D23070: Remove usage of QWeakPointer for QObject for thumbnails.
Sat, Aug 10, 10:04 AM · KWin