From 01b8ec846504b1a13b8523048fbe8bc1171a00e4 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 26 Jun 2017 14:43:47 -0400 Subject: Tag version 1.3.1 in the source tree (no differences from 1.3.0 yet) --- src-qt5/core/libLumina/LDesktopUtils.cpp | 2 +- src-qt5/core/libLumina/NativeWindowSystem.cpp | 48 +++++++++++++-------------- src-qt5/core/libLumina/NativeWindowSystem.h | 12 +++---- 3 files changed, 31 insertions(+), 31 deletions(-) (limited to 'src-qt5/core/libLumina') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index caf3c55e..4454d29b 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -16,7 +16,7 @@ static QStringList fav; QString LDesktopUtils::LuminaDesktopVersion(){ - QString ver = "1.3.0"; + QString ver = "1.3.1"; #ifdef GIT_VERSION ver.append( QString(" (Git Revision: %1)").arg(GIT_VERSION) ); #endif diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index 36a0b7f0..da7f4404 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -59,14 +59,14 @@ public: //Functions for setting up these objects as needed bool init_ATOMS(){ QStringList atoms; - atoms << "WM_TAKE_FOCUS" << "WM_DELETE_WINDOW" << "WM_PROTOCOLS" - << "WM_CHANGE_STATE" << "_NET_SYSTEM_TRAY_OPCODE" << "_NET_SYSTEM_TRAY_ORIENTATION" + atoms << "WM_TAKE_FOCUS" << "WM_DELETE_WINDOW" << "WM_PROTOCOLS" + << "WM_CHANGE_STATE" << "_NET_SYSTEM_TRAY_OPCODE" << "_NET_SYSTEM_TRAY_ORIENTATION" << "_NET_SYSTEM_TRAY_VISUAL" << QString("_NET_SYSTEM_TRAY_S%1").arg(QString::number(QX11Info::appScreen())); //Create all the requests for the atoms QList reply; for(int i=0; ivisual_id); + ATOMS.value("_NET_SYSTEM_TRAY_VISUAL"), XCB_ATOM_VISUALID, 32, 1, &type->visual_id); }else{ qWarning() << " - Could not set TrueColor visual for system tray"; } - + //Finally, send out an X event letting others know that the system tray is up and running xcb_client_message_event_t event; event.response_type = XCB_CLIENT_MESSAGE; event.format = 32; event.window = root_screen->root; event.type = EWMH.MANAGER; //MANAGER atom - event.data.data32[0] = XCB_TIME_CURRENT_TIME; //CurrentTime; + event.data.data32[0] = XCB_TIME_CURRENT_TIME; //CurrentTime; event.data.data32[1] = _NET_SYSTEM_TRAY_S; //_NET_SYSTEM_TRAY_S atom event.data.data32[2] = tray_window; event.data.data32[3] = 0; @@ -255,7 +255,7 @@ void NativeWindowSystem::UpdateWindowProperties(NativeWindow* win, QList< Native if(name.isEmpty()){ //_NET_WM_VISIBLE_NAME xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_visible_name_unchecked(&obj->EWMH, win->id()); - if(cookie.sequence != 0){ + if(cookie.sequence != 0){ xcb_ewmh_get_utf8_strings_reply_t data; if( 1 == xcb_ewmh_get_wm_visible_name_reply(&obj->EWMH, cookie, &data, NULL) ){ name = QString::fromUtf8(data.strings, data.strings_len); @@ -288,7 +288,7 @@ void NativeWindowSystem::UpdateWindowProperties(NativeWindow* win, QList< Native if(name.isEmpty()){ //_NET_WM_VISIBLE_ICON_NAME xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_visible_icon_name_unchecked(&obj->EWMH, win->id()); - if(cookie.sequence != 0){ + if(cookie.sequence != 0){ xcb_ewmh_get_utf8_strings_reply_t data; if( 1 == xcb_ewmh_get_wm_visible_icon_name_reply(&obj->EWMH, cookie, &data, NULL) ){ name = QString::fromUtf8(data.strings, data.strings_len); @@ -337,7 +337,7 @@ void NativeWindowSystem::UpdateWindowProperties(NativeWindow* win, QList< Native uint* dat = iter.data; //dat+=2; //remember the first 2 element offset for(int i=0; isetProperty(NativeWindow::Icon, icon); } //end ICON property - if(props.contains(NativeWindow::MinSize) || props.contains(NativeWindow::MaxSize) + if(props.contains(NativeWindow::MinSize) || props.contains(NativeWindow::MaxSize) || props.contains(NativeWindow::Size) || props.contains(NativeWindow::GlobalPos) ){ //Try the ICCCM "Normal Hints" structure first (newer spec?) xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_normal_hints_unchecked(QX11Info::connection(), win->id()); @@ -429,7 +429,7 @@ void NativeWindowSystem::NewWindowDetected(WId id){ XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ XCB_EVENT_MASK_ENTER_WINDOW) - + uint32_t value_list[1] = {NORMAL_WIN_EVENT_MASK}; xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); //Now go ahead and create/populate the container for this window @@ -457,7 +457,7 @@ void NativeWindowSystem::NewTrayWindowDetected(WId id){ XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ XCB_EVENT_MASK_ENTER_WINDOW) - + uint32_t value_list[1] = {TRAY_WIN_EVENT_MASK}; xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); //Now go ahead and create/populate the container for this window @@ -478,7 +478,7 @@ void NativeWindowSystem::WindowCloseDetected(WId id){ if(win!=0){ TWindows.removeAll(win); win->emit WindowClosed(id); - win->deleteLater(); + win->deleteLater(); } } } @@ -515,13 +515,13 @@ void NativeWindowSystem::NewMousePress(int buttoncode, WId win){ //Convert the native button code into a Qt mouse button code Qt::MouseButton button; switch(buttoncode){ - case 1: + case 1: button = Qt::LeftButton ; break; - case 2: + case 2: button = Qt::MiddleButton ; break; - case 3: + case 3: button = Qt::RightButton ; break; - case 4: + case 4: button = Qt::LeftButton ; break; default: return; //Unhandled button @@ -534,13 +534,13 @@ void NativeWindowSystem::NewMouseRelease(int buttoncode, WId win){ //Convert the native button code into a Qt mouse button code Qt::MouseButton button; switch(buttoncode){ - case 1: + case 1: button = Qt::LeftButton ; break; - case 2: + case 2: button = Qt::MiddleButton ; break; - case 3: + case 3: button = Qt::RightButton ; break; - case 4: + case 4: button = Qt::LeftButton ; break; default: return; //Unhandled button @@ -564,7 +564,7 @@ void NativeWindowSystem::RequestPropertiesChange(WId win, QListid()){ return NWindows[i]; } + for(int i=0; iid()){ return NWindows[i]; } } return 0; } NativeWindow* findTrayWindow(WId id){ - for(int i=0; iid()){ return TWindows[i]; } + for(int i=0; iid()){ return TWindows[i]; } } return 0; } - //Now define a simple private_objects class so that each implementation + //Now define a simple private_objects class so that each implementation // has a storage container for defining/placing private objects as needed class p_objects; p_objects* obj; @@ -58,7 +58,7 @@ private: } } - // Since some properties may be easier to update in bulk + // Since some properties may be easier to update in bulk // let the native system interaction do them in whatever logical groups are best void UpdateWindowProperties(NativeWindow* win, QList< NativeWindow::Property > props); -- cgit