diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-30 14:55:24 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-04-03 10:24:40 +0000 |
commit | 47664d3f2e12649d324b031ca6ffd5589fe3d197 (patch) | |
tree | afb6f467c5e055c34d342f8d3f45c728bb890aba /vcl/unx | |
parent | d719c01c2f112d97b09aee008f9bfee57719eeed (diff) |
fdo#58807 bring Beep() for basic back
The functionality was removed by fdo#48549.
This partially reverts
0f6101cfef4c2e45d9f1f1b3a61ef94799e4526b
0bdf6fc7c71c4c49e6d6f83d56ac953272ad16d5
85cb9084533605657aca0394afe4516058a8e4ef
I changed the behavior to always beep, because only the basic macro
function is using Beep(). Looks like the Beep macro function didn't
even work correctly before the removal, because the default was to
not beep for most platforms. So I set the volume from disable (0)
to 50% for XBell().
Change-Id: I663ffb7af75d2fd6d2c1f94073e4412d9744de4a
Reviewed-on: https://gerrit.libreoffice.org/3124
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
Tested-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 5 |
3 files changed, 17 insertions, 0 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 0662899dba6e..fdc0c6814dc6 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -645,6 +645,12 @@ void SalX11Display::SetupInput( SalI18N_InputMethod *pInputMethod ) SetKbdExtension( pKbdExtension ); } +// Sound +void SalDisplay::Beep() const +{ + XBell( pDisp_, 100 ); +} + // Keyboard namespace { diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index d614dd5728e9..3ea05095faac 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2522,6 +2522,12 @@ bool X11SalFrame::SetPluginParent( SystemParentData* pNewParent ) return true; } +// Sound +void X11SalFrame::Beep() +{ + GetDisplay()->Beep(); +} + // Event Handling static sal_uInt16 sal_GetCode( int state ) diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 63df5260cfe4..3e9da947db95 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -2651,6 +2651,11 @@ void GtkSalFrame::UpdateSettings( AllSettings& rSettings ) ReleaseGraphics( pGraphics ); } +void GtkSalFrame::Beep() +{ + gdk_display_beep( getGdkDisplay() ); +} + const SystemEnvData* GtkSalFrame::GetSystemData() const { return &m_aSystemData; |