rename the 'root' context to 'desktop'
This commit is contained in:
parent
df79dc5767
commit
a098c2437e
4 changed files with 11 additions and 10 deletions
2
data/rc3
2
data/rc3
|
@ -297,7 +297,7 @@
|
|||
<action name="close"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="root">
|
||||
<context name="desktop">
|
||||
<mousebind button="A-Up" action="click">
|
||||
<action name="desktopright"/>
|
||||
</mousebind>
|
||||
|
|
|
@ -603,8 +603,8 @@ static void layout_title(ObFrame *self)
|
|||
|
||||
ObFrameContext frame_context_from_string(char *name)
|
||||
{
|
||||
if (!g_ascii_strcasecmp("root", name))
|
||||
return OB_FRAME_CONTEXT_ROOT;
|
||||
if (!g_ascii_strcasecmp("desktop", name))
|
||||
return OB_FRAME_CONTEXT_DESKTOP;
|
||||
else if (!g_ascii_strcasecmp("client", name))
|
||||
return OB_FRAME_CONTEXT_CLIENT;
|
||||
else if (!g_ascii_strcasecmp("titlebar", name))
|
||||
|
@ -640,22 +640,23 @@ ObFrameContext frame_context(ObClient *client, Window win)
|
|||
{
|
||||
ObFrame *self;
|
||||
|
||||
if (win == RootWindow(ob_display, ob_screen)) return OB_FRAME_CONTEXT_ROOT;
|
||||
if (win == RootWindow(ob_display, ob_screen))
|
||||
return OB_FRAME_CONTEXT_DESKTOP;
|
||||
if (client == NULL) return OB_FRAME_CONTEXT_NONE;
|
||||
if (win == client->window) {
|
||||
/* conceptually, this is the root window, as far as users are
|
||||
/* conceptually, this is the desktop, as far as users are
|
||||
concerned */
|
||||
if (client->type == OB_CLIENT_TYPE_DESKTOP)
|
||||
return OB_FRAME_CONTEXT_ROOT;
|
||||
return OB_FRAME_CONTEXT_DESKTOP;
|
||||
return OB_FRAME_CONTEXT_CLIENT;
|
||||
}
|
||||
|
||||
self = client->frame;
|
||||
if (win == self->plate) {
|
||||
/* conceptually, this is the root window, as far as users are
|
||||
/* conceptually, this is the desktop, as far as users are
|
||||
concerned */
|
||||
if (client->type == OB_CLIENT_TYPE_DESKTOP)
|
||||
return OB_FRAME_CONTEXT_ROOT;
|
||||
return OB_FRAME_CONTEXT_DESKTOP;
|
||||
return OB_FRAME_CONTEXT_CLIENT;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ struct _ObClient;
|
|||
|
||||
typedef enum {
|
||||
OB_FRAME_CONTEXT_NONE,
|
||||
OB_FRAME_CONTEXT_ROOT,
|
||||
OB_FRAME_CONTEXT_DESKTOP,
|
||||
OB_FRAME_CONTEXT_CLIENT,
|
||||
OB_FRAME_CONTEXT_TITLEBAR,
|
||||
OB_FRAME_CONTEXT_HANDLE,
|
||||
|
|
|
@ -19,7 +19,7 @@ typedef struct {
|
|||
} ObMouseBinding;
|
||||
|
||||
#define CLIENT_CONTEXT(co, cl) ((cl && cl->type == OB_CLIENT_TYPE_DESKTOP) ? \
|
||||
co == OB_FRAME_CONTEXT_ROOT : \
|
||||
co == OB_FRAME_CONTEXT_DESKTOP : \
|
||||
co == OB_FRAME_CONTEXT_CLIENT)
|
||||
|
||||
/* Array of GSList*s of PointerBinding*s. */
|
||||
|
|
Loading…
Reference in a new issue