mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
core: Add private function to get the current selection owner
This is a bit untidy to expose, however may be necessary internally.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1186
(cherry picked from commit fbd6366edd
)
This commit is contained in:
parent
e8d9996c9c
commit
5f40493c84
32
src/core/meta-selection-private.h
Normal file
32
src/core/meta-selection-private.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Red Hat
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
* 02111-1307, USA.
|
||||||
|
*
|
||||||
|
* Written by:
|
||||||
|
* Carlos Garnacho <carlosg@gnome.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef META_SELECTION_PRIVATE_H
|
||||||
|
#define META_SELECTION_PRIVATE_H
|
||||||
|
|
||||||
|
#include "meta/meta-selection.h"
|
||||||
|
|
||||||
|
MetaSelectionSource *
|
||||||
|
meta_selection_get_current_owner (MetaSelection *selection,
|
||||||
|
MetaSelectionType selection_type);
|
||||||
|
|
||||||
|
#endif /* META_SELECTION_PRIVATE_H */
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "core/meta-selection-private.h"
|
||||||
#include "meta/meta-selection.h"
|
#include "meta/meta-selection.h"
|
||||||
|
|
||||||
typedef struct TransferRequest TransferRequest;
|
typedef struct TransferRequest TransferRequest;
|
||||||
@ -402,3 +403,13 @@ meta_selection_transfer_finish (MetaSelection *selection,
|
|||||||
|
|
||||||
return g_task_propagate_boolean (G_TASK (result), error);
|
return g_task_propagate_boolean (G_TASK (result), error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MetaSelectionSource *
|
||||||
|
meta_selection_get_current_owner (MetaSelection *selection,
|
||||||
|
MetaSelectionType selection_type)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (META_IS_SELECTION (selection), NULL);
|
||||||
|
g_return_val_if_fail (selection_type < META_N_SELECTION_TYPES, NULL);
|
||||||
|
|
||||||
|
return selection->owners[selection_type];
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user