Closed Bug 506254 Opened 11 years ago Closed 11 years ago

plugin_client_message_filter never used Display *dpy

Categories

(Core :: Widget: Gtk, enhancement)

x86
Linux
enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 file)

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/widget/src/gtk2/nsWindow.cpp&rev=1.65

is the original code

3213 Display *dpy ;
3214 dpy = GDK_WINDOW_XDISPLAY((GdkWindow*)(gPluginFocusWindow->
3215 GetNativeData(NS_NATIVE_WINDOW)));
3216 if (gdk_x11_get_xatom_by_name("WM_PROTOCOLS")
3217 != xevent->xclient.message_type) { 3218 return return_val;
3219 }
3220
3221 if ((Atom) xevent->xclient.data.l[0] ==
3222 gdk_x11_get_xatom_by_name("WM_TAKE_FOCUS")) {
3223 // block it from gtk2.0 focus proxy 3224 return_val = GDK_FILTER_REMOVE;
3225 }
3226
3227 return return_val;
3228 }
Attached patch remove dpySplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #390680 - Flags: review?(roc)
Shouldn't we use something like this instead?

GdkDisplay* display = gdk_drawable_get_display(gPluginFocusWindow->...);
... gdk_x11_get_xatom_by_name_for_display(display, "WM_TAKE_FOCUS")
mats: i'm not familiar with this code (and really don't want to be), i'm merely offering the simplest changes, if you want to do something else, please feel free to take the bug (or any of the other bugs i've filed).
Looking through this file there's numerous places that assumes the Display
is the default one.  So nevermind my comment, please land as is for now.
http://hg.mozilla.org/mozilla-central/rev/649c62df8edc
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.