xaizek / d2if (License: GPLv2+) (since 2018-12-07)
Simple dzen2 input formatter, which is supposed to not waste CPU time for nothing and provides a number of builtin "widgets" for displaying system information.
Commit b0535224c67b0c1578c13fb6d31128aba6fd1f12

Fix leaking memory from XKeyboard::getGroupCount()
We shouldn't lose much by not updating list of layouts.

Alternatively, could rewrite initializeXkb(), but it's quite
heavyweight to call often, so just leave this stuff commented out.

There was also const_cast<>...
Author: xaizek
Author date (UTC): 2016-12-02 21:59
Committer name: xaizek
Committer date (UTC): 2016-12-02 22:02
Parent(s): 7b9620c3eb4931086344ebfccb2f9f3268d0c093
Signing key: 99DC5E4DB05F6BE2
Tree: c6c969169d056248b1fbca9c7b293895e3d6a3a5
File Lines added Lines deleted
src/XKeyboard.cpp 4 1
File src/XKeyboard.cpp changed (mode: 100644) (index ff9295b..f214250)
... ... int XKeyboard::currentGroupNum() const
252 252
253 253 std::size_t XKeyboard::getGroupCount() const std::size_t XKeyboard::getGroupCount() const
254 254 { {
255 static_cast<void>(const_cast<XKeyboard *>(this)->initializeXkb());
255 // this probably supposed to update list of layouts, but loading it every
256 // time isn't nice and results in memory leak in _symbolNames (elements are
257 // appended there)
258 // static_cast<void>(const_cast<XKeyboard *>(this)->initializeXkb());
256 259 return static_cast<std::size_t>(_groupNames.size()); return static_cast<std::size_t>(_groupNames.size());
257 260 } }
258 261
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/d2if

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/d2if

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master