mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
display: Use logical monitor API when requesting pad OSD
Don't use the array index based logical monitor API and switch to the one directly referencing logical monitor instances. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
af616c96d4
commit
06770b0dd4
@ -3089,7 +3089,6 @@ meta_display_request_pad_osd (MetaDisplay *display,
|
||||
const gchar *layout_path = NULL;
|
||||
ClutterActor *osd;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
gint monitor_idx;
|
||||
GSettings *settings;
|
||||
#ifdef HAVE_LIBWACOM
|
||||
WacomDevice *wacom_device;
|
||||
@ -3119,20 +3118,12 @@ meta_display_request_pad_osd (MetaDisplay *display,
|
||||
if (!layout_path || !settings)
|
||||
return;
|
||||
|
||||
if (logical_monitor)
|
||||
{
|
||||
monitor_idx =
|
||||
meta_screen_get_monitor_index_for_rect (display->screen,
|
||||
&logical_monitor->rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
monitor_idx = meta_screen_get_current_monitor (display->screen);
|
||||
}
|
||||
if (!logical_monitor)
|
||||
logical_monitor = meta_screen_get_current_logical_monitor (display->screen);
|
||||
|
||||
g_signal_emit (display, display_signals[SHOW_PAD_OSD], 0,
|
||||
pad, settings, layout_path,
|
||||
edition_mode, monitor_idx, &osd);
|
||||
edition_mode, logical_monitor->number, &osd);
|
||||
|
||||
if (osd)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user