Feed Advanced Search

Aug 12 2019

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.

Aug 12 2019, 6:48 AM · KWin

Aug 11 2019

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

Remove locals.

Aug 11 2019, 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
Aug 11 2019, 8:15 PM
gladhorn closed D23101: Move common code out of if/else.
Aug 11 2019, 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
Aug 11 2019, 8:15 PM
gladhorn closed D23086: Be consistent about touch point id type: use qint32.
Aug 11 2019, 8:15 PM · KWin
gladhorn added a reviewer for D23101: Move common code out of if/else: KWin.
Aug 11 2019, 7:56 PM · KWin
gladhorn added a reviewer for D23102: Reduce duplicate code calculating popup position: KWin.
Aug 11 2019, 7:56 PM · KWin
gladhorn requested review of D23102: Reduce duplicate code calculating popup position.
Aug 11 2019, 7:55 PM · KWin
gladhorn requested review of D23101: Move common code out of if/else.
Aug 11 2019, 7:55 PM · KWin
gladhorn added a comment to D23069: Remove disabled TabGroup feature.

OK, now this should apply :)

Aug 11 2019, 7:53 PM · Documentation, KWin
gladhorn committed R108:ed4a9d756aab: Clean up usage of m_client (authored by gladhorn).
Clean up usage of m_client
Aug 11 2019, 7:08 PM
gladhorn closed D23067: Clean up usage of m_client.
Aug 11 2019, 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.

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

Also add curly braces.

Aug 11 2019, 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.

Aug 11 2019, 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.

Aug 11 2019, 6:27 PM · KWin
gladhorn added inline comments to D23067: Clean up usage of m_client.
Aug 11 2019, 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

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

Fix up commit message

Aug 11 2019, 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.

Aug 11 2019, 2:26 PM · KWin
gladhorn committed R108:969403b35fe5: Make iterating over Layer enum simple (authored by gladhorn).
Make iterating over Layer enum simple
Aug 11 2019, 2:23 PM
gladhorn closed D23085: Make iterating over Layer enum simple.
Aug 11 2019, 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.

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

Removed, cast, made if one line.

Aug 11 2019, 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. :-)

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

Also removed shortCaption which was only used by tab group.

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

Fix up a few more places (mostly isCurrentTab related)

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

Aug 10 2019

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

Restored tabbox code

Aug 10 2019, 8:00 PM · Documentation, 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.

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

Attempt to remove entire tabgroup feature.

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

Removed first nullptr check

Aug 10 2019, 6:37 PM · KWin
gladhorn added inline comments to D23067: Clean up usage of m_client.
Aug 10 2019, 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.

Aug 10 2019, 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
Aug 10 2019, 2:25 PM
gladhorn closed D23071: Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent.
Aug 10 2019, 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
Aug 10 2019, 2:24 PM
gladhorn closed D23070: Remove usage of QWeakPointer for QObject for thumbnails.
Aug 10 2019, 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?

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

better commit message

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

improve commit message

Aug 10 2019, 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.

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

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

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

Improve commit message

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

Fix commit message

Aug 10 2019, 10:51 AM · KWin
gladhorn closed D23068: Fix ifdefs resulting in dead code.
Aug 10 2019, 10:27 AM · KWin
gladhorn committed R108:ef670c3648bf: Fix ifdefs resulting in dead code (authored by gladhorn).
Fix ifdefs resulting in dead code
Aug 10 2019, 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.

Aug 10 2019, 10:19 AM · Documentation, KWin
gladhorn requested review of D23071: Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent.
Aug 10 2019, 10:16 AM · KWin
gladhorn added a reviewer for D23070: Remove usage of QWeakPointer for QObject for thumbnails: KWin.
Aug 10 2019, 10:06 AM · KWin
gladhorn added a reviewer for D23069: Remove disabled TabGroup feature: KWin.
Aug 10 2019, 10:06 AM · Documentation, KWin
gladhorn requested review of D23070: Remove usage of QWeakPointer for QObject for thumbnails.
Aug 10 2019, 10:04 AM · KWin
gladhorn requested review of D23069: Remove disabled TabGroup feature.
Aug 10 2019, 9:58 AM · Documentation, KWin
gladhorn requested review of D23068: Fix ifdefs resulting in dead code.
Aug 10 2019, 9:50 AM · KWin
gladhorn added inline comments to D23067: Clean up usage of m_client.
Aug 10 2019, 9:32 AM · KWin
gladhorn updated the diff for D23067: Clean up usage of m_client.

Added a pile of curly brances.

Aug 10 2019, 9:31 AM · KWin
gladhorn closed D23065: Remove usage of QWeakPointer for QObject.

https://commits.kde.org/kwin/9002f9b99eacb2ea6ba66bbaa39a1209ce18db4b - the arc command line tool confused me yet again... sorry.

Aug 10 2019, 9:20 AM · KWin
gladhorn committed R108:9002f9b99eac: Remove usage of QWeakPointer for QObject (authored by gladhorn).
Remove usage of QWeakPointer for QObject
Aug 10 2019, 9:18 AM
gladhorn requested review of D23067: Clean up usage of m_client.
Aug 10 2019, 8:43 AM · KWin
gladhorn added a reviewer for D23065: Remove usage of QWeakPointer for QObject: KWin.
Aug 10 2019, 8:35 AM · KWin
gladhorn requested review of D23065: Remove usage of QWeakPointer for QObject.
Aug 10 2019, 8:35 AM · KWin

Aug 9 2019

gladhorn committed R108:67b7904d5c22: Fix typo mkae -> make (authored by gladhorn).
Fix typo mkae -> make
Aug 9 2019, 10:26 PM
gladhorn committed R108:5a2ae2747496: Remove stray semicolon (authored by gladhorn).
Remove stray semicolon
Aug 9 2019, 10:26 PM
gladhorn committed R110:cc8f88d93821: Simplify XRandR::outputChanged (authored by gladhorn).
Simplify XRandR::outputChanged
Aug 9 2019, 9:56 PM
gladhorn closed D14764: Simplify XRandR::outputChanged.
Aug 9 2019, 9:56 PM · Plasma
gladhorn closed D16479: Use override for tabbox classes.

Looks like someone added override in the meantime :)

Aug 9 2019, 9:51 PM · KWin
gladhorn added a comment to D23056: RFC: Don't auto-restart KRunner when crashed.

I like the idea, I have krunner crashing every so often, but usually it manages to restart, so I never look into that. Getting a backtrace would make fixing it much more likely.

Aug 9 2019, 9:29 PM · Plasma
gladhorn requested review of D23043: Include xkb.h.
Aug 9 2019, 1:00 PM · Plasma
gladhorn requested review of D23042: When implementing assignment, also implement copy ctor.
Aug 9 2019, 12:59 PM · Plasma

Jul 18 2019

gladhorn committed R119:18001c2926dc: Fix build, include QTime (authored by gladhorn).
Fix build, include QTime
Jul 18 2019, 8:50 AM
gladhorn closed D22522: Fix build, include QTime.
Jul 18 2019, 8:50 AM · Plasma
gladhorn requested review of D22522: Fix build, include QTime.
Jul 18 2019, 7:56 AM · Plasma

Jul 2 2019

gladhorn committed R119:b7affafa425b: Fix toolTipDelegate.virtualDesktopParent (authored by gladhorn).
Fix toolTipDelegate.virtualDesktopParent
Jul 2 2019, 8:03 AM
gladhorn closed D22208: Fix toolTipDelegate.virtualDesktopParent.
Jul 2 2019, 8:03 AM · Plasma
gladhorn committed R119:d80d3aaebadf: Silence qml error message (authored by gladhorn).
Silence qml error message
Jul 2 2019, 7:54 AM