diff options
author | Darrell Anderson <[email protected]> | 2012-06-14 07:12:29 -0500 |
---|---|---|
committer | Darrell Anderson <[email protected]> | 2012-06-14 07:12:29 -0500 |
commit | af8fdcf1ca7bdbda6f0c1afecd8c2d8ffa23bebb (patch) | |
tree | c2ed11478fd63fbddf89aeac6ad9a7d165ea289a /src | |
parent | 94c25ec781351f6fd7724030311341ea0d7af5f9 (diff) | |
parent | f27c2533f735d53c6b555f387c6390c0690cc246 (diff) | |
download | tqt3-af8fdcf1ca7bdbda6f0c1afecd8c2d8ffa23bebb.tar.gz tqt3-af8fdcf1ca7bdbda6f0c1afecd8c2d8ffa23bebb.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/qwidget_x11.cpp | 32 | ||||
-rw-r--r-- | src/sql/drivers/odbc/qsql_odbc.cpp | 5 | ||||
-rw-r--r-- | src/sql/qt_sql.pri | 4 |
3 files changed, 24 insertions, 17 deletions
diff --git a/src/kernel/qwidget_x11.cpp b/src/kernel/qwidget_x11.cpp index 71c36373b..2aff3012a 100644 --- a/src/kernel/qwidget_x11.cpp +++ b/src/kernel/qwidget_x11.cpp @@ -630,7 +630,10 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) wsa.save_under = True; XChangeWindowAttributes( dpy, id, CWOverrideRedirect | CWSaveUnder, &wsa ); - x11SetWindowType(); + XClassHint class_hint; + class_hint.res_name = (char *) tqAppName(); // application name + class_hint.res_class = (char *) tqAppClass(); // application class + XSetClassHint( dpy, id, &class_hint ); } else if ( topLevel && !desktop ) { // top-level widget TQWidget *p = parentWidget(); // real parent if (p) @@ -693,8 +696,6 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) else XDeleteProperty(dpy, id, qt_xa_motif_wm_hints); - x11SetWindowType(); - // set _NET_WM_WINDOW_STATE if (curr_winstate > 0) XChangeProperty(dpy, id, qt_net_wm_state, XA_ATOM, 32, PropModeReplace, @@ -709,11 +710,6 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) else XDeleteProperty(dpy, id, qt_net_wm_action); - // set _NET_WM_PID - long curr_pid = getpid(); - XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace, - (unsigned char *) &curr_pid, 1); - #ifndef QT_NO_XSYNC // set _NET_WM_SYNC_COUNTER createSyncCounter(); @@ -725,19 +721,31 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) // when we create a toplevel widget, the frame strut should be dirty fstrut_dirty = 1; + } else { + // non-toplevel widgets don't have a frame, so no need to + // update the strut + fstrut_dirty = 0; + } + + if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows + x11SetWindowType(); + + // set _NET_WM_PID + long curr_pid = getpid(); + XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace, + (unsigned char *) &curr_pid, 1); + // declare the widget's object name as window role XChangeProperty( dpy, id, tqt_window_role, XA_STRING, 8, PropModeReplace, (unsigned char *)name(), tqstrlen( name() ) ); // set client leader property + if ( !qt_x11_wm_client_leader ) + qt_x11_create_wm_client_leader(); XChangeProperty( dpy, id, qt_wm_client_leader, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&qt_x11_wm_client_leader, 1 ); - } else { - // non-toplevel widgets don't have a frame, so no need to - // update the strut - fstrut_dirty = 0; } if ( initializeWindow ) { diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index f1c9e8da7..cfe4d337f 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -61,19 +61,18 @@ #endif // newer platform SDKs use SQLLEN instead of SQLINTEGER -#ifdef SQLLEN +#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX) # define TQSQLLEN SQLLEN #else # define TQSQLLEN SQLINTEGER #endif -#ifdef SQLULEN +#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX) # define TQSQLULEN SQLULEN #else # define TQSQLULEN SQLUINTEGER #endif - static const TQSQLLEN COLNAMESIZE = 256; //Map TQt parameter types to ODBC types static const SQLSMALLINT qParamType[ 4 ] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT }; diff --git a/src/sql/qt_sql.pri b/src/sql/qt_sql.pri index 6856b5730..f5bd94872 100644 --- a/src/sql/qt_sql.pri +++ b/src/sql/qt_sql.pri @@ -110,13 +110,13 @@ sql { mac { !contains( LIBS, .*odbc.* ) { - LIBS *= -liodbc + LIBS *= -lodbc } } unix { !contains( LIBS, .*odbc.* ) { - LIBS *= -liodbc + LIBS *= -lodbc } } |