After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 115846 - Focus is forcibly switched after sending WM_DELETE to a window
Focus is forcibly switched after sending WM_DELETE to a window
Status: RESOLVED DUPLICATE of bug 108706
Product: metacity
Classification: Other
Component: general
2.4.x
Other All
: Normal minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2003-06-24 11:09 UTC by uwe
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description uwe 2003-06-24 11:09:50 UTC
In metacity-2.4.34/src/delete.c, in function meta_window_delete () the 
code looks like this (in particular, note the comment in the 
window->has_focus case) 
 
  if (window->delete_window) 
    { 
      meta_topic (META_DEBUG_WINDOW_OPS, 
                  "Deleting %s with delete_window request\n", 
                  window->desc); 
      meta_window_send_icccm_message (window, 
                                      window->display->atom_wm_delete_window, 
                                      timestamp); 
    }                                  
[...]                                  
  if (window->has_focus)               
    { 
      /* This is unfortunately going to result in weirdness 
       * if the window doesn't respond to the delete event. 
       * I don't know how to avoid that though. 
       */ 
      meta_topic (META_DEBUG_FOCUS, 
                  "Focusing top window because focus window %s was 
deleted/killed\n", 
                  window->desc); 
      meta_screen_focus_top_window (window->screen, window); 
    }  
 
 
If a user tries to close the window and the window denies the request to be 
closed (e.g. a JFrame that has its close operation set to the 
DO_NOTHING_ON_CLOSE), the focus is still switced to some other window. 
 
See sun Bug Id 4877726: 
http://developer.java.sun.com/developer/bugParade/bugs/4877726.html
Comment 1 Havoc Pennington 2003-06-24 18:58:30 UTC
The problem here is that I put that code there for some reason, 
and I don't remember what the reason was. :-( Makes it 
hard to evaluate the right thing to do.

We can just take it out and see what happens I suppose.
Comment 2 Mark McLoughlin 2003-10-08 16:00:38 UTC
Okay, I'm marking this as a dup of bug #108706 - Havoc has already
disabled this behaviour pending any reports of weirdness without it.

*** This bug has been marked as a duplicate of 108706 ***