aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-04 21:31:02 (GMT)
committerfluxgen <fluxgen>2003-12-04 21:31:02 (GMT)
commit29beda2d6be3eb6ccf849d7454a804fb966e7ccb (patch)
treec807397e72080c570094dc2a63707ae51a82935b /src/Window.cc
parenta8f39f0d7a97dc1a4438b7df3a667895fb23604d (diff)
downloadfluxbox_pavel-29beda2d6be3eb6ccf849d7454a804fb966e7ccb.zip
fluxbox_pavel-29beda2d6be3eb6ccf849d7454a804fb966e7ccb.tar.bz2
sync function
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/Window.cc b/src/Window.cc
index d6283e4..9dcbf28 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.246 2003/11/27 22:02:28 fluxgen Exp $ 25// $Id: Window.cc,v 1.247 2003/12/04 21:31:02 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -262,7 +262,7 @@ FluxboxWindow::FluxboxWindow(WinClient &client, BScreen &scr, FbWinFrameTheme &t
262 stuck(false), m_managed(false), 262 stuck(false), m_managed(false),
263 maximized(MAX_NONE), 263 maximized(MAX_NONE),
264 m_screen(scr), 264 m_screen(scr),
265 display(0), 265 display(FbTk::App::instance()->display()),
266 m_windowmenu(*scr.menuTheme(), scr.screenNumber(), scr.imageControl(), 266 m_windowmenu(*scr.menuTheme(), scr.screenNumber(), scr.imageControl(),
267 *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), 267 *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())),
268 m_old_decoration(DECOR_NORMAL), 268 m_old_decoration(DECOR_NORMAL),
@@ -394,9 +394,6 @@ void FluxboxWindow::init() {
394 394
395 m_last_focus_time.tv_sec = m_last_focus_time.tv_usec = 0; 395 m_last_focus_time.tv_sec = m_last_focus_time.tv_usec = 0;
396 396
397 // display connection
398 display = FbTk::App::instance()->display();
399
400 m_blackbox_attrib.workspace = m_workspace_number = ~0; 397 m_blackbox_attrib.workspace = m_workspace_number = ~0;
401 398
402 m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0; 399 m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0;
@@ -558,20 +555,20 @@ void FluxboxWindow::init() {
558 if (m_shaped) 555 if (m_shaped)
559 shape(); 556 shape();
560 557
561 XSync(display, false); 558 FbTk::App::instance()->sync(false);
559
562} 560}
563 561
564/// apply shape to this window 562/// apply shape to this window
565void FluxboxWindow::shape() { 563void FluxboxWindow::shape() {
566#ifdef SHAPE 564#ifdef SHAPE
567 if (m_shaped) { 565 if (m_shaped) {
568 Display *disp = FbTk::App::instance()->display(); 566 XShapeCombineShape(display,
569 XShapeCombineShape(disp,
570 frame().window().window(), ShapeBounding, 567 frame().window().window(), ShapeBounding,
571 0, frame().clientArea().y(), // xOff, yOff 568 0, frame().clientArea().y(), // xOff, yOff
572 m_client->window(), 569 m_client->window(),
573 ShapeBounding, ShapeSet); 570 ShapeBounding, ShapeSet);
574 XFlush(disp); 571 XFlush(display);
575 } 572 }
576#endif // SHAPE 573#endif // SHAPE
577 574
@@ -1971,14 +1968,13 @@ void FluxboxWindow::handleEvent(XEvent &event) {
1971 } else { 1968 } else {
1972 m_shaped = false; 1969 m_shaped = false;
1973 // set no shape 1970 // set no shape
1974 Display *disp = FbTk::App::instance()->display(); 1971 XShapeCombineMask(display,
1975 XShapeCombineMask(disp,
1976 frame().window().window(), ShapeBounding, 1972 frame().window().window(), ShapeBounding,
1977 0, 0, 1973 0, 0,
1978 None, ShapeSet); 1974 None, ShapeSet);
1979 } 1975 }
1980 1976
1981 XSync(FbTk::App::instance()->display(), False); 1977 FbTk::App::instance()->sync(false);
1982 break; 1978 break;
1983 } 1979 }
1984#endif // SHAPE 1980#endif // SHAPE
@@ -2813,7 +2809,7 @@ void FluxboxWindow::stopMoving() {
2813 screen().hideGeometry(); 2809 screen().hideGeometry();
2814 XUngrabPointer(display, CurrentTime); 2810 XUngrabPointer(display, CurrentTime);
2815 2811
2816 XSync(display, False); //make sure the redraw is made before we continue 2812 FbTk::App::instance()->sync(false); //make sure the redraw is made before we continue
2817} 2813}
2818 2814
2819void FluxboxWindow::pauseMoving() { 2815void FluxboxWindow::pauseMoving() {
@@ -2837,7 +2833,8 @@ void FluxboxWindow::resumeMoving() {
2837 if (m_workspace_number == screen().currentWorkspaceID()) { 2833 if (m_workspace_number == screen().currentWorkspaceID()) {
2838 frame().show(); 2834 frame().show();
2839 } 2835 }
2840 XSync(display,false); 2836
2837 FbTk::App::instance()->sync(false);
2841 2838
2842 parent().drawRectangle(screen().rootTheme().opGC(), 2839 parent().drawRectangle(screen().rootTheme().opGC(),
2843 m_last_move_x, m_last_move_y, 2840 m_last_move_x, m_last_move_y,