Wrap X11 headers in ui/gfx/x/x11.h
https://chromium-review.googlesource.com/756711
This commit is contained in:
parent
97414cc931
commit
82d204e932
7 changed files with 15 additions and 26 deletions
|
@ -29,12 +29,12 @@ void SetWMSpecState(::Window xwindow, bool enabled, ::Atom state) {
|
|||
xclient.xclient.format = 32;
|
||||
xclient.xclient.data.l[0] = enabled ? 1 : 0;
|
||||
xclient.xclient.data.l[1] = state;
|
||||
xclient.xclient.data.l[2] = None;
|
||||
xclient.xclient.data.l[2] = x11::None;
|
||||
xclient.xclient.data.l[3] = 1;
|
||||
xclient.xclient.data.l[4] = 0;
|
||||
|
||||
XDisplay* xdisplay = gfx::GetXDisplay();
|
||||
XSendEvent(xdisplay, DefaultRootWindow(xdisplay), False,
|
||||
XSendEvent(xdisplay, DefaultRootWindow(xdisplay), x11::False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask, &xclient);
|
||||
}
|
||||
|
||||
|
@ -42,10 +42,10 @@ void SetWindowType(::Window xwindow, const std::string& type) {
|
|||
XDisplay* xdisplay = gfx::GetXDisplay();
|
||||
std::string type_prefix = "_NET_WM_WINDOW_TYPE_";
|
||||
::Atom window_type = XInternAtom(
|
||||
xdisplay, (type_prefix + base::ToUpperASCII(type)).c_str(), False);
|
||||
xdisplay, (type_prefix + base::ToUpperASCII(type)).c_str(), x11::False);
|
||||
XChangeProperty(xdisplay, xwindow,
|
||||
XInternAtom(xdisplay, "_NET_WM_WINDOW_TYPE", False), XA_ATOM,
|
||||
32, PropModeReplace,
|
||||
XInternAtom(xdisplay, "_NET_WM_WINDOW_TYPE", x11::False),
|
||||
XA_ATOM, 32, PropModeReplace,
|
||||
reinterpret_cast<unsigned char*>(&window_type), 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue