Skip to content

Commit

Permalink
#990:
Browse files Browse the repository at this point in the history
* skip _NET_MOVERESIZE_WINDOW silently for non-"WindowModel" windows (OR and trays)
* make sure we call the superclass process_client_message_event from the base window class
* remove duplicated _NET_CLOSE_WINDOW code

git-svn-id: https://xpra.org/svn/Xpra/trunk@11057 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 27, 2015
1 parent d5f580a commit 4047db2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/xpra/x11/gtk2/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,7 @@ def process_client_message_event(self, event):
# _NET_RESTACK_WINDOW
# _NET_WM_STATE (more fully)

if event.message_type=="_NET_CLOSE_WINDOW":
log.info("_NET_CLOSE_WINDOW received by %s", self)
self.request_close()
return True
elif event.message_type=="_NET_WM_STATE":
if event.message_type=="_NET_WM_STATE":
def update_wm_state(prop):
current = self.get_property(prop)
mode = event.data[0]
Expand All @@ -611,7 +607,7 @@ def update_wm_state(prop):
else:
log.warn("invalid mode for _NET_WM_STATE: %s", mode)
return
log("do_xpra_client_message_event(%s) window %s=%s after %s (current state=%s)", event, prop, v, STATE_STRING.get(mode, mode), current)
log("process_client_message_event(%s) window %s=%s after %s (current state=%s)", event, prop, v, STATE_STRING.get(mode, mode), current)
if v!=current:
self.update_wm_state(prop, v)
atom1 = get_pyatom(event.window, event.data[1])
Expand Down Expand Up @@ -644,7 +640,7 @@ def update_wm_state(prop):
elif atom1=="_NET_WM_STATE_MODAL":
update_wm_state("modal")
else:
log.info("do_xpra_client_message_event(%s) unhandled atom=%s", event, atom1)
log.info("process_client_message_event(%s) unhandled atom=%s", event, atom1)
return True
elif event.message_type=="WM_CHANGE_STATE":
log("WM_CHANGE_STATE: %s", event.data[0])
Expand Down Expand Up @@ -689,4 +685,4 @@ def update_wm_state(prop):
# it may make sense to apply it to the client_window
# whereas the code in WindowModel assumes there is a corral window
#not handled:
return False
return CoreX11WindowModel.process_client_message_event(self, event)
4 changes: 4 additions & 0 deletions src/xpra/x11/gtk2/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@ def process_client_message_event(self, event):
framelog("_NET_REQUEST_FRAME_EXTENTS")
self._handle_frame_changed()
return True
elif event.message_type=="_NET_MOVERESIZE_WINDOW":
#this is overriden in WindowModel, skipped everywhere else:
geomlog("_NET_MOVERESIZE_WINDOW skipped on %s (data=%s)", self, event.data)
return True
#not handled:
return False

Expand Down

0 comments on commit 4047db2

Please sign in to comment.