Bug 27926 - Impossible to change bell pitch
Summary: Impossible to change bell pitch
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 35611 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-01 06:47 UTC by Nicolas George
Modified: 2011-03-24 07:24 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Proposed fix (1.07 KB, patch)
2010-05-01 06:47 UTC, Nicolas George
no flags Details | Splinter Review
Proposed fix (git format) (1.60 KB, patch)
2010-06-02 04:58 UTC, Nicolas George
no flags Details | Splinter Review

Description Nicolas George 2010-05-01 06:47:02 UTC
Created attachment 35362 [details] [review]
Proposed fix

Using xset b to change the bell pitch has no effect.

Steps to reproduce:

  1. Start a fresh X.org server:

  xinit /usr/bin/xterm -- :1

  2. Play the bell:

  xset b 50 400; printf '\a'

  3. Repeat with 800 instead of 400.

  Expected result: bell of a different pitch.
  Actual result: bell of the same pitch.

The simple attached patch fixes the problem.

Explanation: the pitch change is done to "virtual core keyboard" but not to "virtual core keyboard XTEST". The servers then plays two bells, one with the altered pitch and one with the default pitch. As the PC speaker can only play one sound, the second one takes precedence.

This patch makes the use of IsMaster consistent with other similar loops in the same source file. Furthermore, the current version is absurd, as keyboard = PickKeyboard(client) is always a master keyboard.

Regards,

-- 
  Nicolas George
Comment 1 Peter Hutterer 2010-06-01 22:00:46 UTC
Patch is correct, please submit as git-formatted patch though (signed-off, too) and I'll push it. Feel free to add my Reviewed-by tag to the patch.

http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches
Comment 2 Nicolas George 2010-06-02 04:58:00 UTC
Created attachment 36007 [details] [review]
Proposed fix (git format)

Thanks for the review, and sorry for the bad format of the patch. Here is the updated version.
Comment 3 higuita 2010-06-13 08:50:36 UTC
Any news about applying this patch?

thanks
Comment 4 Julien Cristau 2010-06-13 08:57:43 UTC
done 10 days ago.

commit 968a79dcf5e17ac3963953ef56b8f94dbd75323b
Author: Nicolas George <nicolas.george@normalesup.org>
Date:   Wed Jun 2 13:40:51 2010 +0200

    Change keyboard controls on slave keyboards (#27926)
    
    Makes the use of IsMaster in ProcChangeKeyboardControl consistent with other
    similar loops.
    
    Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Comment 5 Alan Coopersmith 2011-03-24 07:24:12 UTC
*** Bug 35611 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.