Commit 4fce41a5 authored by Lubosz Sarnecki's avatar Lubosz Sarnecki

window-manager: Rename fields in XrdWindowFlags enum consistently.

Document XrdWindowFlags and XrdHoverMode.
parent b51b5504
......@@ -201,7 +201,7 @@ xrd_client_add_window (XrdClient *self,
xrd_window_manager_add_window (manager, window, flags);
XrdClientPrivate *priv = xrd_client_get_instance_private (self);
if (priv->pinned_only &&
!(flags & XRD_WINDOW_MANAGER_BUTTON) &&
!(flags & XRD_WINDOW_BUTTON) &&
!xrd_window_is_pinned (window))
{
xrd_window_hide (window);
......@@ -309,7 +309,7 @@ xrd_client_add_button (XrdClient *self,
button,
XRD_WINDOW_HOVERABLE |
XRD_WINDOW_DESTROY_WITH_PARENT |
XRD_WINDOW_MANAGER_BUTTON);
XRD_WINDOW_BUTTON);
g_signal_connect (button, "grab-start-event",
(GCallback) press_callback, press_callback_data);
......
......@@ -26,10 +26,10 @@ struct _XrdWindowManager
GSList *destroy_windows;
GSList *containers;
/* all windows except XRD_WINDOW_MANAGER_BUTTON */
/* all windows except XRD_WINDOW_BUTTON */
GSList *all_windows;
/* XRD_WINDOW_MANAGER_BUTTON */
/* XRD_WINDOW_BUTTON */
GSList *buttons;
gboolean controls_shown;
......@@ -347,7 +347,7 @@ xrd_window_manager_add_window (XrdWindowManager *self,
XrdWindowFlags flags)
{
/* any window must be either in all_windows or buttons */
if (flags & XRD_WINDOW_MANAGER_BUTTON)
if (flags & XRD_WINDOW_BUTTON)
{
self->buttons = g_slist_append (self->buttons, window);
if (!self->controls_shown)
......
......@@ -43,15 +43,34 @@ typedef struct TransformTransition
gint64 last_timestamp;
} TransformTransition;
/**
* XrdWindowFlags:
* @XRD_WINDOW_HOVERABLE: Set if hover events should be generated.
* @XRD_WINDOW_DRAGGABLE: Set if the window should be draggable.
* @XRD_WINDOW_MANAGED: Set if window should be manipulated by window manager auto alignment.
* @XRD_WINDOW_DESTROY_WITH_PARENT: Set if window should be destroyed with the window manager.
* @XRD_WINDOW_BUTTON: Set if window is a button.
*
* Flags for the window manager.
*
**/
typedef enum
{
XRD_WINDOW_HOVERABLE = 1 << 0,
XRD_WINDOW_DRAGGABLE = 1 << 1,
XRD_WINDOW_MANAGED = 1 << 2,
XRD_WINDOW_DESTROY_WITH_PARENT = 1 << 3,
XRD_WINDOW_MANAGER_BUTTON = 1 << 4,
XRD_WINDOW_BUTTON = 1 << 4,
} XrdWindowFlags;
/**
* XrdHoverMode:
* @XRD_HOVER_MODE_EVERYTHING: Buttons and windows should receive events.
* @XRD_HOVER_MODE_BUTTONS: Only buttons should receive events.
*
* A mode where input events can be ignored for certain widgets.
*
**/
typedef enum
{
XRD_HOVER_MODE_EVERYTHING,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment