[Xfce4-commits] <xfwm4:master> Remove the mouse button grab/ungrab that was introduced to fix an issue with older mozilla and the use of a stylesheet with <pre>a:hover { POSITION: relative; }</pre>
Olivier Fourdan
noreply at xfce.org
Mon Dec 12 20:52:02 CET 2011
Updating branch refs/heads/master
to d30cd2fb8a2303ed93dd4d0e5d73bfb337541f59 (commit)
from 6e8f12e4797fbe142b678ff4f4cfaa2ac3d27b81 (commit)
commit d30cd2fb8a2303ed93dd4d0e5d73bfb337541f59
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Mon Dec 12 17:58:14 2011 +0100
Remove the mouse button grab/ungrab that was introduced to fix an issue with older mozilla and the use of a stylesheet with <pre>a:hover { POSITION: relative; }</pre>
src/client.c | 13 +-----------
src/events.c | 4 +--
src/focus.c | 60 --------------------------------------------------------
src/focus.h | 3 --
src/main.c | 2 -
src/stacking.c | 10 ---------
6 files changed, 2 insertions(+), 90 deletions(-)
diff --git a/src/client.c b/src/client.c
index 9292365..6ca134d 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1210,10 +1210,6 @@ clientFree (Client * c)
{
clientClearLastRaise (c->screen_info);
}
- if (clientGetLastUngrab () == c)
- {
- clientClearLastUngrab ();
- }
if (clientGetDelayedFocus () == c)
{
clientClearDelayedFocus ();
@@ -1459,7 +1455,6 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
XSetWindowAttributes attributes;
Client *c = NULL;
gboolean shaped;
- gboolean grabbed;
unsigned long valuemask;
long pid;
int i;
@@ -1845,7 +1840,6 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
/* Notify the compositor about this new window */
compositorAddWindow (display_info, c->frame, c);
- grabbed = FALSE;
if (!FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED))
{
if ((c->win_workspace == screen_info->current_ws) ||
@@ -1860,7 +1854,6 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
else
{
clientFocusNew(c);
- grabbed = TRUE;
}
}
else
@@ -1877,11 +1870,7 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
clientSetNetActions (c);
}
clientUpdateOpacity (c);
-
- if (!grabbed)
- {
- clientGrabMouseButton (c);
- }
+ clientGrabMouseButton (c);
setNetFrameExtents (display_info, c->window, frameTop (c), frameLeft (c),
frameRight (c), frameBottom (c));
clientSetNetState (c);
diff --git a/src/events.c b/src/events.c
index 83de2a5..2f9fa64 100644
--- a/src/events.c
+++ b/src/events.c
@@ -302,7 +302,7 @@ handleKeyPress (DisplayInfo *display_info, XKeyEvent * ev)
Client *c;
int key;
- TRACE ("entering handleKeyEvent");
+ TRACE ("entering handleKeyPress");
ev_screen_info = myDisplayGetScreenFromRoot (display_info, ev->root);
if (!ev_screen_info)
@@ -990,7 +990,6 @@ handleButtonPress (DisplayInfo *display_info, XButtonEvent * ev)
else if (ev->window == c->window)
{
replay = TRUE;
- clientPassGrabMouseButton (c);
if (((screen_info->params->raise_with_any_button) && (c->type & WINDOW_REGULAR_FOCUSABLE)) || (ev->button == Button1))
{
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
@@ -1722,7 +1721,6 @@ handleFocusOut (DisplayInfo *display_info, XFocusChangeEvent * ev)
if ((c) && (c == clientGetFocus ()))
{
TRACE ("focus lost from \"%s\" (0x%lx)", c->name, c->window);
- clientPassGrabMouseButton (NULL);
clientUpdateFocus (c->screen_info, NULL, NO_FOCUS_FLAG);
clientClearDelayedRaise ();
}
diff --git a/src/focus.c b/src/focus.c
index 74f7e73..f58807c 100644
--- a/src/focus.c
+++ b/src/focus.c
@@ -58,7 +58,6 @@ struct _ClientPair
static Client *client_focus = NULL;
static Client *pending_focus = NULL;
static Client *user_focus = NULL;
-static Client *last_ungrab = NULL;
static Client *delayed_focus = NULL;
static guint focus_timeout = 0;
@@ -213,7 +212,6 @@ clientFocusNew(Client * c)
clientSetFocus (screen_info, c,
myDisplayGetCurrentTime (display_info),
FOCUS_IGNORE_MODAL);
- clientPassGrabMouseButton (c);
}
else
{
@@ -242,7 +240,6 @@ clientFocusNew(Client * c)
}
clientShow (c, TRUE);
- clientGrabMouseButton (c);
clientSetNetState (c);
}
@@ -365,11 +362,6 @@ clientPassFocus (ScreenInfo *screen_info, Client *c, GList *exclude_list)
return;
}
- if (current_focus == last_ungrab)
- {
- clientPassGrabMouseButton (NULL);
- }
-
display_info = screen_info->display_info;
top_most = clientGetTopMostFocusable (screen_info, look_in_layer, exclude_list);
@@ -502,15 +494,6 @@ clientUpdateFocus (ScreenInfo *screen_info, Client * c, unsigned short flags)
return;
}
- /*
- We can release the button mouse grab if we don't raise on click or if the focused window
- is the one that has been raised at last.
- */
- if (!(screen_info->params->raise_on_click) || (c == clientGetLastRaise (screen_info)))
- {
- clientPassGrabMouseButton (c);
- }
-
client_focus = c;
if (c2)
{
@@ -742,7 +725,6 @@ clientGrabMouseButtonForAll (ScreenInfo *screen_info)
{
clientGrabMouseButton (c);
}
- clientClearLastUngrab ();
}
void
@@ -758,48 +740,6 @@ clientUngrabMouseButtonForAll (ScreenInfo *screen_info)
{
clientUngrabMouseButton (c);
}
- clientClearLastUngrab ();
-}
-
-void
-clientPassGrabMouseButton (Client * c)
-{
- TRACE ("entering clientPassMouseGrabButton");
-
- if (c == NULL)
- {
- if (last_ungrab)
- {
- clientGrabMouseButton (last_ungrab);
- }
- last_ungrab = NULL;
- return;
- }
-
- if (last_ungrab == c)
- {
- return;
- }
-
- TRACE ("ungrabing buttons for client \"%s\" (0x%lx)", c->name, c->window);
- if (last_ungrab)
- {
- clientGrabMouseButton (last_ungrab);
- }
- clientUngrabMouseButton (c);
- last_ungrab = c;
-}
-
-Client *
-clientGetLastUngrab (void)
-{
- return last_ungrab;
-}
-
-void
-clientClearLastUngrab (void)
-{
- last_ungrab = NULL;
}
static gboolean
diff --git a/src/focus.h b/src/focus.h
index 620c63e..7e25277 100644
--- a/src/focus.h
+++ b/src/focus.h
@@ -77,9 +77,6 @@ void clientGrabMouseButton (Client *);
void clientUngrabMouseButton (Client *);
void clientGrabMouseButtonForAll (ScreenInfo *);
void clientUngrabMouseButtonForAll (ScreenInfo *);
-void clientPassGrabMouseButton (Client *);
-Client *clientGetLastUngrab (void);
-void clientClearLastUngrab (void);
void clientClearDelayedFocus (void);
void clientAddDelayedFocus (Client *);
Client *clientGetDelayedFocus (void);
diff --git a/src/main.c b/src/main.c
index 40c0bca..2a1e6a7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -62,7 +62,6 @@
#include "startup_notification.h"
#include "compositor.h"
#include "spinning_cursor.h"
-#include "stock_icons.h"
#define BASE_EVENT_MASK \
SubstructureNotifyMask|\
@@ -438,7 +437,6 @@ initialize (gint compositor_mode, gboolean replace_wm)
#else /* HAVE_COMPOSITOR */
main_display_info->enable_compositor = FALSE;
#endif /* HAVE_COMPOSITOR */
- initWMStockIcons ();
initModifiers (main_display_info->dpy);
diff --git a/src/stacking.c b/src/stacking.c
index 5c04fa5..1d0a59a 100644
--- a/src/stacking.c
+++ b/src/stacking.c
@@ -315,15 +315,6 @@ clientRaise (Client * c, Window wsibling)
* by clicking inside.
*/
- if (c == clientGetFocus ())
- {
- clientPassGrabMouseButton (c);
- }
- else
- {
- clientPassGrabMouseButton (NULL);
- }
-
if (g_list_length (screen_info->windows_stack) < 1)
{
return;
@@ -530,7 +521,6 @@ clientLower (Client * c, Window wsibling)
*/
clientApplyStackList (screen_info);
clientSetNetClientList (screen_info, display_info->atoms[NET_CLIENT_LIST_STACKING], screen_info->windows_stack);
- clientPassGrabMouseButton (NULL);
clientPassFocus (screen_info, c, NULL);
if (screen_info->last_raise == c)
{
More information about the Xfce4-commits
mailing list