Profile

Cover photo
Peter Hutterer
Works at Red Hat
858,423 views
AboutPosts

Stream

Peter Hutterer

Shared publicly  - 
 
Is there a way to force the _typeof_ of an enum value so it corresponds to the actual enum type? i.e. get rid of the "signed vs unsigned comparison" warning (-Wsign-compare) in this bit:

enum myenum { FOO, BAR };

#define test(x, y) \
    do { \
        _typeof_(x) _a = x; \
        _typeof_(y) _b = y; \
        if (_a != _b) abort(); \
    } while(0)

int main(void) {
    enum myenum value = BAR;

    test(value, FOO);

    return 0;
}
1
Alison Chaiken's profile photoJonas Ådahl's profile photoThiago Macieira's profile photoPeter Hutterer's profile photo
6 comments
 
it wouldn't be used in C++ code, at least not in my case so I don't have to worry about this. meanwhile, the workaround was to assign the value to a temporary variable. Not as nice, but still readable and gets rid of the warning and is less prone to misc bugs :)
Add a comment...

Peter Hutterer

Shared publicly  - 
 
If you have a chromebook, please post the model number and the content of /sys/class/dmi/id/modalias
Trying to get some udev matching rules for chromebook touchpads and it'd be nice to get all chromebooks covered quickly.
Thanks.
1
4
Timo Paulssen's profile photoAdrian M Negreanu's profile photoSabine “Atari-Frosch” Engelhardt's profile photoRobert Schreiner's profile photo
4 comments
 
32 bit arm based Chromebooks won't have dmi as it does not exist for 32 bit arm.
Add a comment...

Peter Hutterer

Shared publicly  - 
 
Short update on the Lenovo X1 Carbon 3rd and *50 series trackpoint issues: +Benjamin Tissoires' kernel patches queued for 4.0 do not require userspace handling. The trackpoint buttons will now be re-routed in the kernel to the right device, so to userspace everything appears as normal.

http://who-t.blogspot.com.au/2015/01/lenovos-x1-carbon-3rd-touchpad-woes.html
[Update 19/03/15]: TLDR: kernel patches queued for 4.0 do not require any userspace changes. Lenovo released a new set of laptops for 2015 with a new (old) feature: the trackpoint device has the physical buttons back. Last ye...
7
Add a comment...

Peter Hutterer

Shared publicly  - 
 
libinput 0.12 is out, and that means the API/ABI is officially declared stable.

http://lists.freedesktop.org/archives/wayland-devel/2015-March/020475.html
[ANNOUNCE] libinput 0.12.0. Peter Hutterer peter.hutterer at who-t.net. Sun Mar 8 23:40:06 PDT 2015. Previous message: [RFC] Implementing Wayland Security Module; Next message: [PATCH wayland] server: add helper functions for wl_global; Messages sorted by: [ date ] [ thread ] [ subject ] ...
23
1
Peter Hutterer's profile photoAlexandre Prokoudine's profile photoMohamed Ikbel Boulabiar's profile photo
3 comments
 
Awesome!
Add a comment...

Peter Hutterer

Shared publicly  - 
 
I have a tendency to add double empty lines in code but they're frowned upon and unnecessary. So after a bit of googling, I found the solution:

$ git config filter.trimWhitespace.clean git-stripspace

This adds a filter named "trimWhitespace" to the git config, calling git-stripspace.

$ echo "*.c" filter=trimWhitespace >> .git/info/attributes
$ echo "*.h" filter=trimWhitespace >> .git/info/attributes

And the filter will be called for all .c and .h files.
6
Joel Stanley's profile photoMatthis Thorade's profile photo
2 comments
 
What would I have to do if I want to call the filter for all text files (i.e. not binary) globally (i.e. in all my repositories)?
Add a comment...

Peter Hutterer

Shared publicly  - 
 
A developer's favourite game: push-and-seek.

I give you a branchname, you go and find the repository. Is it on github? gitorious? bitbucket? hours of fun!
10
Andrew Pinski's profile photo
 
I like performance counter seeking. I give you name of performance counter and then you go and find which block does that counter and how to access it. Is it in the core, l2c, l2ctads, or lmc. 
Add a comment...

Peter Hutterer

Shared publicly  - 
 
For the german speakers:
http://www.spiegel.de/static/happ/wissenschaft/2015/sprachatlas/v0/dist/#/questions
A quiz that tells you where you come from based on the words you use and how you pronounce them.

The town I grew up in was number two on the list of results, the top guess was the next large city ~30km away. Very impressive.
 ·  Translate
Können wir Sie aufgrund von Spracheigenheiten innerhalb des deutschsprachigen Europas verorten? Sagen Sie uns, wie Sie sprechen, und wir sagen Ihnen, woher Sie stammen.
4
2
Boudewijn Rempt's profile photoAlexander Neundorf's profile photo
Add a comment...

Peter Hutterer

Shared publicly  - 
 
After another big release cycle I'm happy to announce that libinput 0.14.1 is out now. Plenty of fixes, including the addition of middle mouse button emulation, multi-tap for triple-clicking, better palm detection and a bunch of devices that previously didn't work is now handled correctly.

Also of use: the new libinput-list-devices tool that shows what devices are locally available and what configuration option libinput assigns to them, along with their defaults.

Linking to the 0.14.0 announcement here which has all the details:
http://lists.freedesktop.org/archives/wayland-devel/2015-April/021484.html
22
1
Jonathon Conte's profile photoGianluca Sforna's profile photo
 
Thanks for getting Linux input out of the stone age. I'm looking forward to upgrading to Fedora 22 to see how things have improved.
Add a comment...

Peter Hutterer

Shared publicly  - 
 
So Red Hat are now formally a member of the Khronos Groups who many of probably know as the shepherds of the OpenGL standard. We haven't gotten all the little bits sorted yet, like getting our logo on the Khronos website, but our engineers are signing up for the various Khronos working groups ...
7 comments on original post
5
Add a comment...

Peter Hutterer

Shared publicly  - 
 
Do you have an Apple laptop? What's your model number and the physical size of the touchpad? I can't find any concrete sizes except for the Macbook Pros (and even that's based on the size of a touchpad protective cover)
1
Peter Hutterer's profile photoGianluca Sforna's profile photoEmmanuele Bassi's profile photoChris Bagwell's profile photo
6 comments
 
Only have a cheap tape measure handy. MacBook Air 13", mid-2012: ~104mm x ~75mm. MacBook Air 11" mid-2013: ~104mm x ~63mm.
Add a comment...

Peter Hutterer

Shared publicly  - 
 
Fedora 22 now uses the xorg libinput driver as default driver on new installations.

https://lists.fedoraproject.org/pipermail/devel/2015-February/208204.html
Libinput now enabled as default xorg driver for F-22 workstation installs. Hans de Goede hdegoede at redhat.com. Mon Feb 23 12:32:29 UTC 2015. Previous message: F-22 Branched report: 20150223 changes; Next message: Libinput now enabled as default xorg driver for F-22 workstation installs ...
20
1
Jan Alexander Steffens (heftig)'s profile photoWiktor Julian Sztwiertnia (Druedain)'s profile photoPeter Hutterer's profile photoJim Basilio's profile photo
3 comments
 
+Jan Alexander Steffens did you file a bug for the scroll issue? the clickfinger mode option has since been added (0.9.0 I think)
Add a comment...

Peter Hutterer

Shared publicly  - 
 
libinput 0.11.0 is available now, featuring input device groups and using udev to help with device tagging.

http://lists.freedesktop.org/archives/wayland-devel/2015-February/020126.html
[ANNOUNCE] libinput 0.11.0. Peter Hutterer peter.hutterer at who-t.net. Sun Feb 22 16:59:09 PST 2015. Previous message: Experiment: compiling Wayland and Weston with Meson; Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] ...
5
Add a comment...
Story
Introduction
X.Org input maintainer
Links
Work
Employment
  • Red Hat
    Senior Software Engineer, present