зеркало из https://github.com/electron/electron.git
Remove usage of X11AtomCache
See https://codereview.chromium.org/2914103002/
This commit is contained in:
Родитель
da04cbd4d8
Коммит
513d4fd225
|
@ -7,6 +7,7 @@
|
|||
#include <X11/Xlib.h>
|
||||
|
||||
#include "ui/events/platform/platform_event_source.h"
|
||||
#include "ui/gfx/x/x11_atom_cache.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
|
@ -22,7 +23,6 @@ const char* kAtomsToCache[] = {
|
|||
WindowStateWatcher::WindowStateWatcher(NativeWindowViews* window)
|
||||
: window_(window),
|
||||
widget_(window->GetAcceleratedWidget()),
|
||||
atom_cache_(gfx::GetXDisplay(), kAtomsToCache),
|
||||
was_minimized_(false),
|
||||
was_maximized_(false) {
|
||||
ui::PlatformEventSource::GetInstance()->AddPlatformEventObserver(this);
|
||||
|
@ -70,7 +70,7 @@ void WindowStateWatcher::DidProcessEvent(const ui::PlatformEvent& event) {
|
|||
|
||||
bool WindowStateWatcher::IsWindowStateEvent(const ui::PlatformEvent& event) {
|
||||
::Atom changed_atom = event->xproperty.atom;
|
||||
return (changed_atom == atom_cache_.GetAtom("_NET_WM_STATE") &&
|
||||
return (changed_atom == gfx::GetAtom("_NET_WM_STATE") &&
|
||||
event->type == PropertyNotify &&
|
||||
event->xproperty.window == widget_);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "ui/events/platform/platform_event_observer.h"
|
||||
|
||||
#include "atom/browser/native_window_views.h"
|
||||
#include "ui/gfx/x/x11_atom_cache.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
|
@ -28,8 +27,6 @@ class WindowStateWatcher : public ui::PlatformEventObserver {
|
|||
NativeWindowViews* window_;
|
||||
gfx::AcceleratedWidget widget_;
|
||||
|
||||
ui::X11AtomCache atom_cache_;
|
||||
|
||||
bool was_minimized_;
|
||||
bool was_maximized_;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче