diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dialogs/tqdialog.cpp | 6 | ||||
| -rw-r--r-- | src/kernel/tqapplication_x11.cpp | 296 | ||||
| -rw-r--r-- | src/kernel/tqdesktopwidget_x11.cpp | 28 | ||||
| -rw-r--r-- | src/kernel/tqwidget_x11.cpp | 224 |
4 files changed, 277 insertions, 277 deletions
diff --git a/src/dialogs/tqdialog.cpp b/src/dialogs/tqdialog.cpp index efeb03abc..57e8386b3 100644 --- a/src/dialogs/tqdialog.cpp +++ b/src/dialogs/tqdialog.cpp @@ -676,8 +676,8 @@ extern "C" { int XSetTransientForHint( Display *, unsigned long, unsigned long ) #include <private/tqt_x11_p.h> #undef FocusIn // defined in tqapplication_x11.cpp -extern Atom qt_net_wm_full_placement; -extern bool qt_net_supports(Atom atom); +extern Atom tqt_net_wm_full_placement; +extern bool tqt_net_supports(Atom atom); #endif // TQ_WS_X11 /*! @@ -699,7 +699,7 @@ void TQDialog::show() if ( !did_resize ) adjustSize(); - if( !qt_net_supports( qt_net_wm_full_placement )) { + if( !tqt_net_supports( tqt_net_wm_full_placement )) { if ( has_relpos && !did_move ) { adjustPositionInternal( parentWidget(), true ); } else if ( !did_move ) { diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp index 5b0bba96e..2c78dc6c0 100644 --- a/src/kernel/tqapplication_x11.cpp +++ b/src/kernel/tqapplication_x11.cpp @@ -214,18 +214,18 @@ static GC* app_gc_tmp = 0; // temporary GC static GC* app_gc_ro_m = 0; // read-only GC (monochrome) static GC* app_gc_tmp_m = 0; // temporary GC (monochrome) // symbols needed by extern TQXEmbed class -TQ_EXPORT Atom tqt_wm_protocols = 0; // window manager protocols +TQ_EXPORT Atom tqt_wm_protocols = 0; // window manager protocols TQ_EXPORT Atom tqt_wm_delete_window = 0; // delete window protocol TQ_EXPORT Atom tqt_wm_take_focus = 0; // take focus window protocol Atom qt_qt_scrolldone = 0; // scroll synchronization -Atom qt_net_wm_context_help = 0; // context help -Atom qt_net_wm_ping = 0; // _NET_WM_PING protocol +Atom tqt_net_wm_context_help = 0; // context help +Atom tqt_net_wm_ping = 0; // _NET_WM_PING protocol static Atom qt_xsetroot_id = 0; Atom qt_xa_clipboard = 0; Atom qt_selection_property = 0; -Atom tqt_clipboard_sentinel = 0; +Atom tqt_clipboard_sentinel = 0; Atom qt_selection_sentinel = 0; TQ_EXPORT Atom tqt_wm_state = 0; Atom qt_wm_change_state = 0; @@ -250,68 +250,68 @@ bool qt_broken_wm = false; static void qt_detect_broken_window_manager(); // NET WM support -Atom qt_net_supported = 0; -Atom qt_net_wm_name = 0; -Atom qt_net_wm_icon_name = 0; -Atom qt_net_virtual_roots = 0; -Atom qt_net_workarea = 0; -Atom qt_net_wm_state = 0; -Atom qt_net_wm_state_modal = 0; -Atom qt_net_wm_state_max_v = 0; -Atom qt_net_wm_state_max_h = 0; -Atom qt_net_wm_state_fullscreen = 0; -Atom qt_net_wm_state_above = 0; -Atom qt_net_wm_action = 0; -Atom qt_net_wm_action_move = 0; -Atom qt_net_wm_action_resize = 0; -Atom qt_net_wm_action_minimize = 0; -Atom qt_net_wm_action_shade = 0; -Atom qt_net_wm_action_stick = 0; -Atom qt_net_wm_action_max_h = 0; -Atom qt_net_wm_action_max_v = 0; -Atom qt_net_wm_action_fullscreen = 0; -Atom qt_net_wm_action_change_desktop = 0; -Atom qt_net_wm_action_close = 0; -Atom qt_net_wm_action_above = 0; -Atom qt_net_wm_action_below = 0; -Atom qt_net_wm_window_type = 0; -Atom qt_net_wm_window_type_normal = 0; -Atom qt_net_wm_window_type_dialog = 0; -Atom qt_net_wm_window_type_toolbar = 0; -Atom qt_net_wm_window_type_menu = 0; -Atom qt_net_wm_window_type_utility = 0; -Atom qt_net_wm_window_type_splash = 0; -Atom qt_net_wm_window_type_override = 0; // KDE extension -Atom qt_net_wm_window_type_dropdown_menu = 0; -Atom qt_net_wm_window_type_popup_menu = 0; -Atom qt_net_wm_window_type_tooltip = 0; -Atom qt_net_wm_window_type_combo = 0; -Atom qt_net_wm_window_type_dnd = 0; -Atom qt_net_wm_frame_strut = 0; // KDE extension -Atom qt_net_wm_state_stays_on_top = 0; // KDE extension -Atom qt_net_wm_pid = 0; -Atom qt_net_wm_user_time = 0; -Atom qt_net_wm_full_placement = 0; // KDE extension +Atom tqt_net_supported = 0; +Atom tqt_net_wm_name = 0; +Atom tqt_net_wm_icon_name = 0; +Atom tqt_net_virtual_roots = 0; +Atom tqt_net_workarea = 0; +Atom tqt_net_wm_state = 0; +Atom tqt_net_wm_state_modal = 0; +Atom tqt_net_wm_state_max_v = 0; +Atom tqt_net_wm_state_max_h = 0; +Atom tqt_net_wm_state_fullscreen = 0; +Atom tqt_net_wm_state_above = 0; +Atom tqt_net_wm_action = 0; +Atom tqt_net_wm_action_move = 0; +Atom tqt_net_wm_action_resize = 0; +Atom tqt_net_wm_action_minimize = 0; +Atom tqt_net_wm_action_shade = 0; +Atom tqt_net_wm_action_stick = 0; +Atom tqt_net_wm_action_max_h = 0; +Atom tqt_net_wm_action_max_v = 0; +Atom tqt_net_wm_action_fullscreen = 0; +Atom tqt_net_wm_action_change_desktop = 0; +Atom tqt_net_wm_action_close = 0; +Atom tqt_net_wm_action_above = 0; +Atom tqt_net_wm_action_below = 0; +Atom tqt_net_wm_window_type = 0; +Atom tqt_net_wm_window_type_normal = 0; +Atom tqt_net_wm_window_type_dialog = 0; +Atom tqt_net_wm_window_type_toolbar = 0; +Atom tqt_net_wm_window_type_menu = 0; +Atom tqt_net_wm_window_type_utility = 0; +Atom tqt_net_wm_window_type_splash = 0; +Atom tqt_net_wm_window_type_override = 0; // KDE extension +Atom tqt_net_wm_window_type_dropdown_menu = 0; +Atom tqt_net_wm_window_type_popup_menu = 0; +Atom tqt_net_wm_window_type_tooltip = 0; +Atom tqt_net_wm_window_type_combo = 0; +Atom tqt_net_wm_window_type_dnd = 0; +Atom tqt_net_wm_frame_strut = 0; // KDE extension +Atom tqt_net_wm_state_stays_on_top = 0; // KDE extension +Atom tqt_net_wm_pid = 0; +Atom tqt_net_wm_user_time = 0; +Atom tqt_net_wm_full_placement = 0; // KDE extension // Enlightenment support Atom qt_enlightenment_desktop = 0; // window managers list of supported "stuff" -Atom *qt_net_supported_list = 0; +Atom *tqt_net_supported_list = 0; // list of virtual root windows -Window *qt_net_virtual_root_list = 0; +Window *tqt_net_virtual_root_list = 0; // X11 SYNC support #ifndef TQT_NO_XSYNC -Atom qt_net_wm_sync_request_counter = 0; -Atom qt_net_wm_sync_request = 0; +Atom tqt_net_wm_sync_request_counter = 0; +Atom tqt_net_wm_sync_request = 0; #endif // client leader window Window qt_x11_wm_client_leader = 0; // function to update the workarea of the screen - in tqdesktopwidget_x11.cpp -extern void qt_desktopwidget_update_workarea(); +extern void tqt_desktopwidget_update_workarea(); // current focus model static const int FocusModel_Unknown = -1; @@ -1451,14 +1451,14 @@ void qt_get_net_supported() unsigned char *data = 0; int e = XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow(), - qt_net_supported, 0, 0, + tqt_net_supported, 0, 0, False, XA_ATOM, &type, &format, &nitems, &after, &data); if (data) XFree(data); - if (qt_net_supported_list) - delete [] qt_net_supported_list; - qt_net_supported_list = 0; + if (tqt_net_supported_list) + delete [] tqt_net_supported_list; + tqt_net_supported_list = 0; if (e == Success && type == XA_ATOM && format == 32) { TQBuffer ts; @@ -1466,7 +1466,7 @@ void qt_get_net_supported() while (after > 0) { XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow(), - qt_net_supported, offset, 1024, + tqt_net_supported, offset, 1024, False, XA_ATOM, &type, &format, &nitems, &after, &data); if (type == XA_ATOM && format == 32) { @@ -1481,25 +1481,25 @@ void qt_get_net_supported() // compute nitems TQByteArray buffer(ts.buffer()); nitems = buffer.size() / sizeof(Atom); - qt_net_supported_list = new Atom[nitems + 1]; + tqt_net_supported_list = new Atom[nitems + 1]; Atom *a = (Atom *) buffer.data(); uint i; for (i = 0; i < nitems; i++) - qt_net_supported_list[i] = a[i]; - qt_net_supported_list[nitems] = 0; + tqt_net_supported_list[i] = a[i]; + tqt_net_supported_list[nitems] = 0; } } -bool qt_net_supports(Atom atom) +bool tqt_net_supports(Atom atom) { - if (! qt_net_supported_list) + if (! tqt_net_supported_list) return false; bool supported = false; int i = 0; - while (qt_net_supported_list[i] != 0) { - if (qt_net_supported_list[i++] == atom) { + while (tqt_net_supported_list[i] != 0) { + if (tqt_net_supported_list[i++] == atom) { supported = true; break; } @@ -1512,11 +1512,11 @@ bool qt_net_supports(Atom atom) // update the virtual roots array void qt_get_net_virtual_roots() { - if (qt_net_virtual_root_list) - delete [] qt_net_virtual_root_list; - qt_net_virtual_root_list = 0; + if (tqt_net_virtual_root_list) + delete [] tqt_net_virtual_root_list; + tqt_net_virtual_root_list = 0; - if (! qt_net_supports(qt_net_virtual_roots)) + if (! tqt_net_supports(tqt_net_virtual_roots)) return; Atom type; @@ -1526,7 +1526,7 @@ void qt_get_net_virtual_roots() unsigned char *data; int e = XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow(), - qt_net_virtual_roots, 0, 0, + tqt_net_virtual_roots, 0, 0, False, XA_ATOM, &type, &format, &nitems, &after, &data); if (data) XFree(data); @@ -1537,7 +1537,7 @@ void qt_get_net_virtual_roots() while (after > 0) { XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow(), - qt_net_virtual_roots, offset, 1024, + tqt_net_virtual_roots, offset, 1024, False, XA_ATOM, &type, &format, &nitems, &after, &data); if (type == XA_ATOM && format == 32) { @@ -1552,12 +1552,12 @@ void qt_get_net_virtual_roots() // compute nitems TQByteArray buffer(ts.buffer()); nitems = buffer.size() / sizeof(Window); - qt_net_virtual_root_list = new Window[nitems + 1]; + tqt_net_virtual_root_list = new Window[nitems + 1]; Window *a = (Window *) buffer.data(); uint i; for (i = 0; i < nitems; i++) - qt_net_virtual_root_list[i] = a[i]; - qt_net_virtual_root_list[nitems] = 0; + tqt_net_virtual_root_list[i] = a[i]; + tqt_net_virtual_root_list[nitems] = 0; } } @@ -1586,9 +1586,9 @@ void qt_x11_create_wm_client_leader() } } -static void qt_net_update_user_time(TQWidget *tlw) +static void tqt_net_update_user_time(TQWidget *tlw) { - XChangeProperty(TQPaintDevice::x11AppDisplay(), tlw->winId(), qt_net_wm_user_time, XA_CARDINAL, + XChangeProperty(TQPaintDevice::x11AppDisplay(), tlw->winId(), tqt_net_wm_user_time, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &tqt_x_user_time, 1); } @@ -2011,8 +2011,8 @@ void tqt_init_internal( int *argcptr, char **argv, qt_x11_intern_atom( "_QT_SCROLL_DONE", &qt_qt_scrolldone ); qt_x11_intern_atom( "_QT_INPUT_ENCODING", &qt_input_encoding ); qt_x11_intern_atom( "_QT_SIZEGRIP", &qt_sizegrip ); - qt_x11_intern_atom( "_NET_WM_CONTEXT_HELP", &qt_net_wm_context_help ); - qt_x11_intern_atom( "_NET_WM_PING", &qt_net_wm_ping ); + qt_x11_intern_atom( "_NET_WM_CONTEXT_HELP", &tqt_net_wm_context_help ); + qt_x11_intern_atom( "_NET_WM_PING", &tqt_net_wm_ping ); qt_x11_intern_atom( "_MOTIF_WM_HINTS", &qt_xa_motif_wm_hints ); qt_x11_intern_atom( "DTWM_IS_RUNNING", &qt_cde_running ); qt_x11_intern_atom( "KWIN_RUNNING", &qt_twin_running ); @@ -2023,56 +2023,56 @@ void tqt_init_internal( int *argcptr, char **argv, atomname += XDisplayName(appDpyName); qt_x11_intern_atom( atomname.latin1(), &qt_settings_timestamp ); - qt_x11_intern_atom( "_NET_SUPPORTED", &qt_net_supported ); - qt_x11_intern_atom( "_NET_VIRTUAL_ROOTS", &qt_net_virtual_roots ); - qt_x11_intern_atom( "_NET_WORKAREA", &qt_net_workarea ); - qt_x11_intern_atom( "_NET_WM_STATE", &qt_net_wm_state ); - qt_x11_intern_atom( "_NET_WM_STATE_MODAL", &qt_net_wm_state_modal ); - qt_x11_intern_atom( "_NET_WM_STATE_MAXIMIZED_VERT", &qt_net_wm_state_max_v ); - qt_x11_intern_atom( "_NET_WM_STATE_MAXIMIZED_HORZ", &qt_net_wm_state_max_h ); - qt_x11_intern_atom( "_NET_WM_STATE_FULLSCREEN", &qt_net_wm_state_fullscreen ); - qt_x11_intern_atom( "_NET_WM_STATE_ABOVE", &qt_net_wm_state_above ); - qt_x11_intern_atom( "_NET_WM_ALLOWED_ACTIONS", &qt_net_wm_action ); - qt_x11_intern_atom( "_NET_WM_ACTION_MOVE", &qt_net_wm_action_move ); - qt_x11_intern_atom( "_NET_WM_ACTION_RESIZE", &qt_net_wm_action_resize ); - qt_x11_intern_atom( "_NET_WM_ACTION_MINIMIZE", &qt_net_wm_action_minimize ); - qt_x11_intern_atom( "_NET_WM_ACTION_SHADE", &qt_net_wm_action_shade ); - qt_x11_intern_atom( "_NET_WM_ACTION_STICK", &qt_net_wm_action_stick ); - qt_x11_intern_atom( "_NET_WM_ACTION_MAXIMIZE_HORZ", &qt_net_wm_action_max_h ); - qt_x11_intern_atom( "_NET_WM_ACTION_MAXIMIZE_VERT", &qt_net_wm_action_max_v ); - qt_x11_intern_atom( "_NET_WM_ACTION_FULLSCREEN", &qt_net_wm_action_fullscreen ); - qt_x11_intern_atom( "_NET_WM_ACTION_CHANGE_DESKTOP", &qt_net_wm_action_change_desktop ); - qt_x11_intern_atom( "_NET_WM_ACTION_CLOSE", &qt_net_wm_action_close ); - qt_x11_intern_atom( "_NET_WM_ACTION_ABOVE", &qt_net_wm_action_above ); - qt_x11_intern_atom( "_NET_WM_ACTION_BELOW", &qt_net_wm_action_below ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE", &qt_net_wm_window_type ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_NORMAL", &qt_net_wm_window_type_normal ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DIALOG", &qt_net_wm_window_type_dialog ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLBAR", &qt_net_wm_window_type_toolbar ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_MENU", &qt_net_wm_window_type_menu ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_UTILITY", &qt_net_wm_window_type_utility ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_SPLASH", &qt_net_wm_window_type_splash ); - qt_x11_intern_atom( "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", &qt_net_wm_window_type_override ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", &qt_net_wm_window_type_dropdown_menu ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_POPUP_MENU", &qt_net_wm_window_type_popup_menu ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLTIP", &qt_net_wm_window_type_tooltip ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_COMBO", &qt_net_wm_window_type_combo ); - qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DND", &qt_net_wm_window_type_dnd ); - qt_x11_intern_atom( "_KDE_NET_WM_FRAME_STRUT", &qt_net_wm_frame_strut ); + qt_x11_intern_atom( "_NET_SUPPORTED", &tqt_net_supported ); + qt_x11_intern_atom( "_NET_VIRTUAL_ROOTS", &tqt_net_virtual_roots ); + qt_x11_intern_atom( "_NET_WORKAREA", &tqt_net_workarea ); + qt_x11_intern_atom( "_NET_WM_STATE", &tqt_net_wm_state ); + qt_x11_intern_atom( "_NET_WM_STATE_MODAL", &tqt_net_wm_state_modal ); + qt_x11_intern_atom( "_NET_WM_STATE_MAXIMIZED_VERT", &tqt_net_wm_state_max_v ); + qt_x11_intern_atom( "_NET_WM_STATE_MAXIMIZED_HORZ", &tqt_net_wm_state_max_h ); + qt_x11_intern_atom( "_NET_WM_STATE_FULLSCREEN", &tqt_net_wm_state_fullscreen ); + qt_x11_intern_atom( "_NET_WM_STATE_ABOVE", &tqt_net_wm_state_above ); + qt_x11_intern_atom( "_NET_WM_ALLOWED_ACTIONS", &tqt_net_wm_action ); + qt_x11_intern_atom( "_NET_WM_ACTION_MOVE", &tqt_net_wm_action_move ); + qt_x11_intern_atom( "_NET_WM_ACTION_RESIZE", &tqt_net_wm_action_resize ); + qt_x11_intern_atom( "_NET_WM_ACTION_MINIMIZE", &tqt_net_wm_action_minimize ); + qt_x11_intern_atom( "_NET_WM_ACTION_SHADE", &tqt_net_wm_action_shade ); + qt_x11_intern_atom( "_NET_WM_ACTION_STICK", &tqt_net_wm_action_stick ); + qt_x11_intern_atom( "_NET_WM_ACTION_MAXIMIZE_HORZ", &tqt_net_wm_action_max_h ); + qt_x11_intern_atom( "_NET_WM_ACTION_MAXIMIZE_VERT", &tqt_net_wm_action_max_v ); + qt_x11_intern_atom( "_NET_WM_ACTION_FULLSCREEN", &tqt_net_wm_action_fullscreen ); + qt_x11_intern_atom( "_NET_WM_ACTION_CHANGE_DESKTOP", &tqt_net_wm_action_change_desktop ); + qt_x11_intern_atom( "_NET_WM_ACTION_CLOSE", &tqt_net_wm_action_close ); + qt_x11_intern_atom( "_NET_WM_ACTION_ABOVE", &tqt_net_wm_action_above ); + qt_x11_intern_atom( "_NET_WM_ACTION_BELOW", &tqt_net_wm_action_below ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE", &tqt_net_wm_window_type ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_NORMAL", &tqt_net_wm_window_type_normal ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DIALOG", &tqt_net_wm_window_type_dialog ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLBAR", &tqt_net_wm_window_type_toolbar ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_MENU", &tqt_net_wm_window_type_menu ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_UTILITY", &tqt_net_wm_window_type_utility ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_SPLASH", &tqt_net_wm_window_type_splash ); + qt_x11_intern_atom( "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", &tqt_net_wm_window_type_override ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", &tqt_net_wm_window_type_dropdown_menu ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_POPUP_MENU", &tqt_net_wm_window_type_popup_menu ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLTIP", &tqt_net_wm_window_type_tooltip ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_COMBO", &tqt_net_wm_window_type_combo ); + qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DND", &tqt_net_wm_window_type_dnd ); + qt_x11_intern_atom( "_KDE_NET_WM_FRAME_STRUT", &tqt_net_wm_frame_strut ); qt_x11_intern_atom( "_NET_WM_STATE_STAYS_ON_TOP", - &qt_net_wm_state_stays_on_top ); - qt_x11_intern_atom( "_NET_WM_PID", &qt_net_wm_pid ); - qt_x11_intern_atom( "_NET_WM_USER_TIME", &qt_net_wm_user_time ); - qt_x11_intern_atom( "_NET_WM_FULL_PLACEMENT", &qt_net_wm_full_placement ); + &tqt_net_wm_state_stays_on_top ); + qt_x11_intern_atom( "_NET_WM_PID", &tqt_net_wm_pid ); + qt_x11_intern_atom( "_NET_WM_USER_TIME", &tqt_net_wm_user_time ); + qt_x11_intern_atom( "_NET_WM_FULL_PLACEMENT", &tqt_net_wm_full_placement ); qt_x11_intern_atom( "ENLIGHTENMENT_DESKTOP", &qt_enlightenment_desktop ); - qt_x11_intern_atom( "_NET_WM_NAME", &qt_net_wm_name ); - qt_x11_intern_atom( "_NET_WM_ICON_NAME", &qt_net_wm_icon_name ); + qt_x11_intern_atom( "_NET_WM_NAME", &tqt_net_wm_name ); + qt_x11_intern_atom( "_NET_WM_ICON_NAME", &tqt_net_wm_icon_name ); qt_x11_intern_atom( "UTF8_STRING", &qt_utf8_string ); qt_x11_intern_atom( "_SGI_DESKS_MANAGER", &qt_sgi_desks_manager ); #ifndef TQT_NO_XSYNC - qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST_COUNTER", &qt_net_wm_sync_request_counter ); - qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST", &qt_net_wm_sync_request ); + qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST_COUNTER", &tqt_net_wm_sync_request_counter ); + qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST", &tqt_net_wm_sync_request ); #endif qt_xdnd_setup(); @@ -2550,13 +2550,13 @@ void tqt_cleanup() appClass = 0; } - if (qt_net_supported_list) - delete [] qt_net_supported_list; - qt_net_supported_list = 0; + if (tqt_net_supported_list) + delete [] tqt_net_supported_list; + tqt_net_supported_list = 0; - if (qt_net_virtual_root_list) - delete [] qt_net_virtual_root_list; - qt_net_virtual_root_list = 0; + if (tqt_net_virtual_root_list) + delete [] tqt_net_virtual_root_list; + tqt_net_virtual_root_list = 0; } @@ -3234,16 +3234,16 @@ int TQApplication::x11ClientMessage(TQWidget* w, XEvent* event, bool passive_onl TQWidget *p = amw->parentWidget(); while (p && p != widget) p = p->parentWidget(); - if (!p || !qt_net_supported_list) + if (!p || !tqt_net_supported_list) amw->raise(); // help broken window managers amw->setActiveWindow(); } } #ifndef TQT_NO_WHATSTHIS - } else if ( a == qt_net_wm_context_help ) { + } else if ( a == tqt_net_wm_context_help ) { TQWhatsThis::enterWhatsThisMode(); #endif // TQT_NO_WHATSTHIS - } else if ( a == qt_net_wm_ping ) { + } else if ( a == tqt_net_wm_ping ) { // avoid send/reply loops Window root = TQPaintDevice::x11AppRootWindow( w->x11Screen() ); if (event->xclient.window != root) { @@ -3252,7 +3252,7 @@ int TQApplication::x11ClientMessage(TQWidget* w, XEvent* event, bool passive_onl False, SubstructureNotifyMask|SubstructureRedirectMask, event ); } #ifndef TQT_NO_XSYNC - } else if (a == qt_net_wm_sync_request ) { + } else if (a == tqt_net_wm_sync_request ) { widget->handleSyncRequest( event ); #endif } @@ -3444,12 +3444,12 @@ int TQApplication::x11ProcessEvent( XEvent* event ) // root properties for the default screen if ( event->xproperty.atom == qt_input_encoding ) { qt_set_input_encoding(); - } else if ( event->xproperty.atom == qt_net_supported ) { + } else if ( event->xproperty.atom == tqt_net_supported ) { qt_get_net_supported(); - } else if ( event->xproperty.atom == qt_net_virtual_roots ) { + } else if ( event->xproperty.atom == tqt_net_virtual_roots ) { qt_get_net_virtual_roots(); - } else if ( event->xproperty.atom == qt_net_workarea ) { - qt_desktopwidget_update_workarea(); + } else if ( event->xproperty.atom == tqt_net_workarea ) { + tqt_desktopwidget_update_workarea(); } } else if ( widget ) { widget->translatePropertyEvent(event); @@ -3559,7 +3559,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) return 1; } if (event->type == ButtonPress) - qt_net_update_user_time(widget->topLevelWidget()); + tqt_net_update_user_time(widget->topLevelWidget()); // fall through intended case MotionNotify: #if defined(QT_TABLET_SUPPORT) @@ -3574,7 +3574,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) break; case XKeyPress: // keyboard event - qt_net_update_user_time(widget->topLevelWidget()); + tqt_net_update_user_time(widget->topLevelWidget()); // fallthrough intended case XKeyRelease: { @@ -4535,12 +4535,12 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event) unsigned char *data = 0; unsigned long nitems, after; - if (event->xproperty.atom == qt_net_wm_frame_strut) { + if (event->xproperty.atom == tqt_net_wm_frame_strut) { topData()->fleft = topData()->fright = topData()->ftop = topData()->fbottom = 0; fstrut_dirty = 1; if (event->xproperty.state == PropertyNewValue) { - e = XGetWindowProperty(appDpy, event->xproperty.window, qt_net_wm_frame_strut, + e = XGetWindowProperty(appDpy, event->xproperty.window, tqt_net_wm_frame_strut, 0, 4, // struts are 4 longs False, XA_CARDINAL, &ret, &format, &nitems, &after, &data); @@ -4554,14 +4554,14 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event) fstrut_dirty = 0; } } - } else if (event->xproperty.atom == qt_net_wm_state) { + } else if (event->xproperty.atom == tqt_net_wm_state) { bool max = false; bool full = false; if (event->xproperty.state == PropertyNewValue) { // using length of 1024 should be safe for all current and // possible NET states... - e = XGetWindowProperty(appDpy, event->xproperty.window, qt_net_wm_state, 0, 1024, + e = XGetWindowProperty(appDpy, event->xproperty.window, tqt_net_wm_state, 0, 1024, False, XA_ATOM, &ret, &format, &nitems, &after, &data); if (e == Success && ret == XA_ATOM && format == 32 && nitems > 0) { @@ -4569,9 +4569,9 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event) unsigned long i; for (i = 0; i < nitems; i++) { - if (states[i] == qt_net_wm_state_max_v || states[i] == qt_net_wm_state_max_h) + if (states[i] == tqt_net_wm_state_max_v || states[i] == tqt_net_wm_state_max_h) max = true; - else if (states[i] == qt_net_wm_state_fullscreen) + else if (states[i] == tqt_net_wm_state_fullscreen) full = true; } } @@ -4579,8 +4579,8 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event) bool send_event = false; - if (qt_net_supports(qt_net_wm_state_max_v) - && qt_net_supports(qt_net_wm_state_max_h)) { + if (tqt_net_supports(tqt_net_wm_state_max_v) + && tqt_net_supports(tqt_net_wm_state_max_h)) { if (max && !isMaximized()) { setWState(WState_Maximized); send_event = true; @@ -4590,7 +4590,7 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event) } } - if (qt_net_supports(qt_net_wm_state_fullscreen)) { + if (tqt_net_supports(tqt_net_wm_state_fullscreen)) { if (full && !isFullScreen()) { setWState(WState_FullScreen); send_event = true; @@ -5824,11 +5824,11 @@ bool TQETWidget::translateScrollDoneEvent( const XEvent *event ) extern "C" { #endif #ifndef TQT_NO_XSYNC -static Bool qt_net_wm_sync_request_scanner(Display*, XEvent* event, XPointer arg) +static Bool tqt_net_wm_sync_request_scanner(Display*, XEvent* event, XPointer arg) { return (event->type == ClientMessage && event->xclient.window == *(Window*)arg && event->xclient.message_type == tqt_wm_protocols - && ((unsigned int)event->xclient.data.l[ 0 ]) == qt_net_wm_sync_request ); + && ((unsigned int)event->xclient.data.l[ 0 ]) == tqt_net_wm_sync_request ); } #endif @@ -5894,7 +5894,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event ) Window wid = winId(); while ( compressed_configs && XCheckIfEvent( x11Display(), &otherEvent, - qt_net_wm_sync_request_scanner, (XPointer)&wid ) ) { + tqt_net_wm_sync_request_scanner, (XPointer)&wid ) ) { handleSyncRequest( (void*)&otherEvent ); --compressed_configs; } diff --git a/src/kernel/tqdesktopwidget_x11.cpp b/src/kernel/tqdesktopwidget_x11.cpp index 706063b10..6e167bfe5 100644 --- a/src/kernel/tqdesktopwidget_x11.cpp +++ b/src/kernel/tqdesktopwidget_x11.cpp @@ -43,17 +43,17 @@ #include <cstdlib> // defined in tqwidget_x11.cpp -extern int qt_x11_create_desktop_on_screen; +extern int tqt_x11_create_desktop_on_screen; // defined in tqapplication_x11.cpp -extern Atom qt_net_workarea; -extern bool qt_net_supports(Atom atom); +extern Atom tqt_net_workarea; +extern bool tqt_net_supports(Atom atom); // function to update the workarea of the screen -static bool qt_desktopwidget_workarea_dirty = true; -void qt_desktopwidget_update_workarea() +static bool tqt_desktopwidget_workarea_dirty = true; +void tqt_desktopwidget_update_workarea() { - qt_desktopwidget_workarea_dirty = true; + tqt_desktopwidget_workarea_dirty = true; } @@ -199,7 +199,7 @@ void TQDesktopWidgetPrivate::init() } // the TQDesktopWidget itself will be created on the default screen -// as qt_x11_create_desktop_on_screen defaults to -1 +// as tqt_x11_create_desktop_on_screen defaults to -1 TQDesktopWidget::TQDesktopWidget() : TQWidget( 0, "desktop", WType_Desktop ) { @@ -251,9 +251,9 @@ TQWidget *TQDesktopWidget::screen( int screen ) if ( ! d->screens[screen] || // not created yet ! d->screens[screen]->isDesktop() // reparented away ) { - qt_x11_create_desktop_on_screen = screen; + tqt_x11_create_desktop_on_screen = screen; d->screens[screen] = new TQSingleDesktopWidget; - qt_x11_create_desktop_on_screen = -1; + tqt_x11_create_desktop_on_screen = -1; } return d->screens[screen]; @@ -261,11 +261,11 @@ TQWidget *TQDesktopWidget::screen( int screen ) const TQRect& TQDesktopWidget::availableGeometry( int screen ) const { - if ( qt_desktopwidget_workarea_dirty ) { + if ( tqt_desktopwidget_workarea_dirty ) { // the workareas are dirty, invalidate them for ( int i = 0; i < d->screenCount; ++i ) d->workareas[i] = TQRect(); - qt_desktopwidget_workarea_dirty = false; + tqt_desktopwidget_workarea_dirty = false; } if ( screen < 0 || screen >= d->screenCount ) @@ -274,7 +274,7 @@ const TQRect& TQDesktopWidget::availableGeometry( int screen ) const if ( d->workareas[screen].isValid() ) return d->workareas[screen]; - if ( ! isVirtualDesktop() && qt_net_supports( qt_net_workarea ) ) { + if ( ! isVirtualDesktop() && tqt_net_supports( tqt_net_workarea ) ) { Atom ret; int format, e; unsigned char *data = 0; @@ -282,7 +282,7 @@ const TQRect& TQDesktopWidget::availableGeometry( int screen ) const e = XGetWindowProperty( TQPaintDevice::x11AppDisplay(), TQPaintDevice::x11AppRootWindow( screen ), - qt_net_workarea, 0, 4, False, XA_CARDINAL, + tqt_net_workarea, 0, 4, False, XA_CARDINAL, &ret, &format, &nitems, &after, &data ); if ( e == Success && ret == XA_CARDINAL && @@ -353,6 +353,6 @@ int TQDesktopWidget::screenNumber( const TQPoint &point ) const void TQDesktopWidget::resizeEvent( TQResizeEvent *event ) { d->init(); - qt_desktopwidget_workarea_dirty = true; + tqt_desktopwidget_workarea_dirty = true; TQWidget::resizeEvent( event ); } diff --git a/src/kernel/tqwidget_x11.cpp b/src/kernel/tqwidget_x11.cpp index 808d2ef4c..06fa0cb53 100644 --- a/src/kernel/tqwidget_x11.cpp +++ b/src/kernel/tqwidget_x11.cpp @@ -90,15 +90,15 @@ extern Time tqt_x_time; extern Time tqt_x_user_time; #ifndef TQT_NO_XSYNC -extern Atom qt_net_wm_sync_request_counter; -extern Atom qt_net_wm_sync_request; +extern Atom tqt_net_wm_sync_request_counter; +extern Atom tqt_net_wm_sync_request; extern bool qt_use_xsync; #endif // defined in tqfont_x11.cpp extern bool tqt_has_xft; -int qt_x11_create_desktop_on_screen = -1; +int tqt_x11_create_desktop_on_screen = -1; /***************************************************************************** TQWidget member functions @@ -113,53 +113,53 @@ extern Atom qt_wm_client_leader; extern Atom tqt_window_role; extern Atom tqt_sm_client_id; extern Atom qt_utf8_string; -extern Atom qt_net_wm_context_help; -extern Atom qt_net_wm_ping; +extern Atom tqt_net_wm_context_help; +extern Atom tqt_net_wm_ping; extern Atom qt_xa_motif_wm_hints; -extern Atom qt_net_wm_name; -extern Atom qt_net_wm_icon_name; -extern Atom qt_net_wm_state; -extern Atom qt_net_wm_state_modal; -extern Atom qt_net_wm_state_max_v; -extern Atom qt_net_wm_state_max_h; -extern Atom qt_net_wm_state_fullscreen; -extern Atom qt_net_wm_state_above; -extern Atom qt_net_wm_state_stays_on_top; -extern Atom qt_net_wm_action; -extern Atom qt_net_wm_action_move; -extern Atom qt_net_wm_action_resize; -extern Atom qt_net_wm_action_minimize; -extern Atom qt_net_wm_action_shade; -extern Atom qt_net_wm_action_stick; -extern Atom qt_net_wm_action_max_h; -extern Atom qt_net_wm_action_max_v; -extern Atom qt_net_wm_action_fullscreen; -extern Atom qt_net_wm_action_change_desktop; -extern Atom qt_net_wm_action_close; -extern Atom qt_net_wm_action_above; -extern Atom qt_net_wm_action_below; -extern Atom qt_net_wm_window_type; -extern Atom qt_net_wm_window_type_normal; -extern Atom qt_net_wm_window_type_dialog; -extern Atom qt_net_wm_window_type_toolbar; -extern Atom qt_net_wm_window_type_menu; -extern Atom qt_net_wm_window_type_utility; -extern Atom qt_net_wm_window_type_splash; -extern Atom qt_net_wm_window_type_override; -extern Atom qt_net_wm_window_type_dropdown_menu; -extern Atom qt_net_wm_window_type_popup_menu; -extern Atom qt_net_wm_window_type_combo; -extern Atom qt_net_wm_window_type_dnd; -extern Atom qt_net_wm_window_type_tooltip; -extern Atom qt_net_wm_pid; -extern Atom qt_net_wm_user_time; +extern Atom tqt_net_wm_name; +extern Atom tqt_net_wm_icon_name; +extern Atom tqt_net_wm_state; +extern Atom tqt_net_wm_state_modal; +extern Atom tqt_net_wm_state_max_v; +extern Atom tqt_net_wm_state_max_h; +extern Atom tqt_net_wm_state_fullscreen; +extern Atom tqt_net_wm_state_above; +extern Atom tqt_net_wm_state_stays_on_top; +extern Atom tqt_net_wm_action; +extern Atom tqt_net_wm_action_move; +extern Atom tqt_net_wm_action_resize; +extern Atom tqt_net_wm_action_minimize; +extern Atom tqt_net_wm_action_shade; +extern Atom tqt_net_wm_action_stick; +extern Atom tqt_net_wm_action_max_h; +extern Atom tqt_net_wm_action_max_v; +extern Atom tqt_net_wm_action_fullscreen; +extern Atom tqt_net_wm_action_change_desktop; +extern Atom tqt_net_wm_action_close; +extern Atom tqt_net_wm_action_above; +extern Atom tqt_net_wm_action_below; +extern Atom tqt_net_wm_window_type; +extern Atom tqt_net_wm_window_type_normal; +extern Atom tqt_net_wm_window_type_dialog; +extern Atom tqt_net_wm_window_type_toolbar; +extern Atom tqt_net_wm_window_type_menu; +extern Atom tqt_net_wm_window_type_utility; +extern Atom tqt_net_wm_window_type_splash; +extern Atom tqt_net_wm_window_type_override; +extern Atom tqt_net_wm_window_type_dropdown_menu; +extern Atom tqt_net_wm_window_type_popup_menu; +extern Atom tqt_net_wm_window_type_combo; +extern Atom tqt_net_wm_window_type_dnd; +extern Atom tqt_net_wm_window_type_tooltip; +extern Atom tqt_net_wm_pid; +extern Atom tqt_net_wm_user_time; extern Atom qt_enlightenment_desktop; -extern Atom qt_net_virtual_roots; +extern Atom tqt_net_virtual_roots; extern bool qt_broken_wm; // defined in tqapplication_x11.cpp -extern bool qt_net_supports(Atom); -extern unsigned long *qt_net_virtual_root_list; +extern bool tqt_net_supports(Atom); +extern unsigned long *tqt_net_virtual_root_list; #if defined (QT_TABLET_SUPPORT) extern XDevice *devStylus; @@ -244,13 +244,13 @@ TQ_EXPORT void tqt_wait_for_window_manager( TQWidget* w ) tqApp->x11ProcessEvent( &ev ); } -static void qt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom two = 0) +static void tqt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom two = 0) { if (w->isShown()) { // managed by WM XEvent e; e.xclient.type = ClientMessage; - e.xclient.message_type = qt_net_wm_state; + e.xclient.message_type = tqt_net_wm_state; e.xclient.display = w->x11Display(); e.xclient.window = w->winId(); e.xclient.format = 32; @@ -268,7 +268,7 @@ static void qt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom t unsigned long nitems = 0, after = 0; Atom *old_states = 0; status = XGetWindowProperty(w->x11Display(), w->winId(), - qt_net_wm_state, 0, 1024, False, + tqt_net_wm_state, 0, 1024, False, XA_ATOM, &ret, &format, &nitems, &after, &data); if (status == Success && ret == XA_ATOM && format == 32 && nitems > 0) @@ -289,10 +289,10 @@ static void qt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom t } if (j) - XChangeProperty(w->x11Display(), w->winId(), qt_net_wm_state, XA_ATOM, 32, + XChangeProperty(w->x11Display(), w->winId(), tqt_net_wm_state, XA_ATOM, 32, PropModeReplace, (uchar *) new_states, j); else - XDeleteProperty(w->x11Display(), w->winId(), qt_net_wm_state); + XDeleteProperty(w->x11Display(), w->winId(), tqt_net_wm_state); delete [] new_states; if (data) XFree(data); @@ -349,11 +349,11 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) initializeWindow = true; if ( desktop && - qt_x11_create_desktop_on_screen >= 0 && - qt_x11_create_desktop_on_screen != x11Screen() ) { + tqt_x11_create_desktop_on_screen >= 0 && + tqt_x11_create_desktop_on_screen != x11Screen() ) { // desktop on a certain screen other than the default requested TQPaintDeviceX11Data* xd = getX11Data( true ); - xd->x_screen = qt_x11_create_desktop_on_screen; + xd->x_screen = tqt_x11_create_desktop_on_screen; xd->x_depth = TQPaintDevice::x11AppDepth( xd->x_screen ); xd->x_cells = TQPaintDevice::x11AppCells( xd->x_screen ); xd->x_colormap = TQPaintDevice::x11AppColormap( xd->x_screen ); @@ -481,11 +481,11 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) int curr_winaction = 0; // Add all default actions that cannot be turned off - net_winactions[curr_winaction++] = qt_net_wm_action_stick; - net_winactions[curr_winaction++] = qt_net_wm_action_fullscreen; - net_winactions[curr_winaction++] = qt_net_wm_action_change_desktop; - net_winactions[curr_winaction++] = qt_net_wm_action_above; - net_winactions[curr_winaction++] = qt_net_wm_action_below; + net_winactions[curr_winaction++] = tqt_net_wm_action_stick; + net_winactions[curr_winaction++] = tqt_net_wm_action_fullscreen; + net_winactions[curr_winaction++] = tqt_net_wm_action_change_desktop; + net_winactions[curr_winaction++] = tqt_net_wm_action_above; + net_winactions[curr_winaction++] = tqt_net_wm_action_below; struct { ulong flags, functions, decorations; @@ -504,7 +504,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) mwmhints.flags |= (1L << 0); // MWM_HINTS_FUNCTIONS } else { - net_winactions[curr_winaction++] = qt_net_wm_action_resize; + net_winactions[curr_winaction++] = tqt_net_wm_action_resize; } if ( testNFlags(WX11DisableMove) ) { @@ -513,7 +513,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) mwmhints.flags |= (1L << 0); // MWM_HINTS_FUNCTIONS } else { - net_winactions[curr_winaction++] = qt_net_wm_action_move; + net_winactions[curr_winaction++] = tqt_net_wm_action_move; } if ( testNFlags(WX11DisableMinimize) ) { @@ -522,7 +522,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) mwmhints.flags |= (1L << 0); // MWM_HINTS_FUNCTIONS } else { - net_winactions[curr_winaction++] = qt_net_wm_action_minimize; + net_winactions[curr_winaction++] = tqt_net_wm_action_minimize; } if ( testNFlags(WX11DisableMaximize) ) { @@ -531,8 +531,8 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) mwmhints.flags |= (1L << 0); // MWM_HINTS_FUNCTIONS } else { - net_winactions[curr_winaction++] = qt_net_wm_action_max_h; - net_winactions[curr_winaction++] = qt_net_wm_action_max_v; + net_winactions[curr_winaction++] = tqt_net_wm_action_max_h; + net_winactions[curr_winaction++] = tqt_net_wm_action_max_v; } if ( testNFlags(WX11DisableClose) ) { @@ -541,18 +541,18 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) mwmhints.flags |= (1L << 0); // MWM_HINTS_FUNCTIONS } else { - net_winactions[curr_winaction++] = qt_net_wm_action_close; + net_winactions[curr_winaction++] = tqt_net_wm_action_close; } if ( ! testNFlags(WX11DisableShade) ) { - net_winactions[curr_winaction++] = qt_net_wm_action_shade; + net_winactions[curr_winaction++] = tqt_net_wm_action_shade; } if (topLevel && ! (desktop || popup)) { ulong wsa_mask = 0; if ( testWFlags(WStyle_Splash) ) { - if (qt_net_supports(qt_net_wm_window_type_splash)) { + if (tqt_net_supports(tqt_net_wm_window_type_splash)) { clearWFlags( WX11BypassWM ); } else { setWFlags( WX11BypassWM | WStyle_Tool | WStyle_NoBorder ); @@ -592,22 +592,22 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) // maximized netwm state if (testWFlags(WState_Maximized)) { - net_winstates[curr_winstate++] = qt_net_wm_state_max_v; - net_winstates[curr_winstate++] = qt_net_wm_state_max_h; + net_winstates[curr_winstate++] = tqt_net_wm_state_max_v; + net_winstates[curr_winstate++] = tqt_net_wm_state_max_h; } } // stays on top if (testWFlags(WStyle_StaysOnTop)) { - net_winstates[curr_winstate++] = qt_net_wm_state_above; - net_winstates[curr_winstate++] = qt_net_wm_state_stays_on_top; + net_winstates[curr_winstate++] = tqt_net_wm_state_above; + net_winstates[curr_winstate++] = tqt_net_wm_state_stays_on_top; } if (testWFlags(WShowModal)) { mwmhints.input_mode = 3L; // MWM_INPUT_FULL_APPLICATION_MODAL mwmhints.flags |= (1L << 2); // MWM_HINTS_INPUT_MODE - net_winstates[curr_winstate++] = qt_net_wm_state_modal; + net_winstates[curr_winstate++] = tqt_net_wm_state_modal; } if ( testWFlags( WX11BypassWM ) ) { @@ -682,12 +682,12 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) int n = 0; protocols[n++] = tqt_wm_delete_window; // support del window protocol protocols[n++] = tqt_wm_take_focus; // support take focus window protocol - protocols[n++] = qt_net_wm_ping; // support _NET_WM_PING protocol + protocols[n++] = tqt_net_wm_ping; // support _NET_WM_PING protocol #ifndef TQT_NO_XSYNC - protocols[n++] = qt_net_wm_sync_request;// support the _NET_WM_SYNC_REQUEST protocol + protocols[n++] = tqt_net_wm_sync_request;// support the _NET_WM_SYNC_REQUEST protocol #endif if ( testWFlags( WStyle_ContextHelp ) ) - protocols[n++] = qt_net_wm_context_help; + protocols[n++] = tqt_net_wm_context_help; XSetWMProtocols( dpy, id, protocols, n ); // set mwm hints @@ -699,23 +699,23 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) // set _NET_WM_WINDOW_STATE if (curr_winstate > 0) - XChangeProperty(dpy, id, qt_net_wm_state, XA_ATOM, 32, PropModeReplace, + XChangeProperty(dpy, id, tqt_net_wm_state, XA_ATOM, 32, PropModeReplace, (unsigned char *) net_winstates, curr_winstate); else - XDeleteProperty(dpy, id, qt_net_wm_state); + XDeleteProperty(dpy, id, tqt_net_wm_state); // set _NET_WM_ALLOWED_ACTIONS if (curr_winaction > 0) - XChangeProperty(dpy, id, qt_net_wm_action, XA_ATOM, 32, PropModeReplace, + XChangeProperty(dpy, id, tqt_net_wm_action, XA_ATOM, 32, PropModeReplace, (unsigned char *) net_winactions, curr_winaction); else - XDeleteProperty(dpy, id, qt_net_wm_action); + XDeleteProperty(dpy, id, tqt_net_wm_action); #ifndef TQT_NO_XSYNC // set _NET_WM_SYNC_COUNTER createSyncCounter(); long counterVal = topData()->syncCounter; - XChangeProperty( dpy, id, qt_net_wm_sync_request_counter, XA_CARDINAL, 32, PropModeReplace, + XChangeProperty( dpy, id, tqt_net_wm_sync_request_counter, XA_CARDINAL, 32, PropModeReplace, (unsigned char*) &counterVal, 1); #endif @@ -733,7 +733,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) // set _NET_WM_PID long curr_pid = getpid(); - XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace, + XChangeProperty(dpy, id, tqt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &curr_pid, 1); // declare the widget's object name as window role @@ -1010,47 +1010,47 @@ void TQWidget::x11SetWindowType( X11WindowType type ) return; if( type == X11WindowTypeSelect ) { if ( testWFlags(WStyle_Splash)) { - if (qt_net_supports(qt_net_wm_window_type_splash)) { - net_wintypes[curr_wintype++] = qt_net_wm_window_type_splash; + if (tqt_net_supports(tqt_net_wm_window_type_splash)) { + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_splash; } } else if (inherits("TQToolBar")) { // toolbar netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_toolbar; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_toolbar; } else if (testWFlags(WStyle_Customize) && testWFlags(WStyle_Tool)) { // utility netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_utility; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_utility; } else if (testWFlags(WType_Dialog)) { // dialog netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_dialog; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_dialog; } } else if( type == X11WindowTypeCombo ) { // combo netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_combo; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_combo; } else if( type == X11WindowTypeDND ) { // dnd netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_dnd; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_dnd; } else if( type == X11WindowTypeDropdown ) { // dropdown netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_dropdown_menu; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_dropdown_menu; } else if( type == X11WindowTypePopup ) { // popup netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_popup_menu; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_popup_menu; } else if( type == X11WindowTypeMenu ) { // menu netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_menu; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_menu; } else if( type == X11WindowTypeTooltip ) { // tooltip netwm type - net_wintypes[curr_wintype++] = qt_net_wm_window_type_tooltip; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_tooltip; } // normal netwm type - default - net_wintypes[curr_wintype++] = qt_net_wm_window_type_normal; + net_wintypes[curr_wintype++] = tqt_net_wm_window_type_normal; // set _NET_WM_WINDOW_TYPE if (curr_wintype > 0) - XChangeProperty(x11Display(), winId(), qt_net_wm_window_type, XA_ATOM, 32, PropModeReplace, + XChangeProperty(x11Display(), winId(), tqt_net_wm_window_type, XA_ATOM, 32, PropModeReplace, (unsigned char *) net_wintypes, curr_wintype); else - XDeleteProperty(x11Display(), winId(), qt_net_wm_window_type); + XDeleteProperty(x11Display(), winId(), tqt_net_wm_window_type); } void TQWidget::x11SetWindowTransient( TQWidget* parent ) @@ -1295,7 +1295,7 @@ void TQWidget::setCaption( const TQString &caption ) XSetWMName( x11Display(), winId(), tqstring_to_xtp(caption) ); TQCString net_wm_name = caption.utf8(); - XChangeProperty(x11Display(), winId(), qt_net_wm_name, qt_utf8_string, 8, + XChangeProperty(x11Display(), winId(), tqt_net_wm_name, qt_utf8_string, 8, PropModeReplace, (unsigned char *)net_wm_name.data(), net_wm_name.length()); @@ -1380,7 +1380,7 @@ void TQWidget::setIconText( const TQString &iconText ) XSetWMIconName( x11Display(), winId(), tqstring_to_xtp(iconText) ); TQCString net_wm_icon_name = iconText.utf8(); - XChangeProperty(x11Display(), winId(), qt_net_wm_icon_name, qt_utf8_string, 8, PropModeReplace, + XChangeProperty(x11Display(), winId(), tqt_net_wm_icon_name, qt_utf8_string, 8, PropModeReplace, (unsigned char *) net_wm_icon_name.data(), net_wm_icon_name.length()); } @@ -1829,9 +1829,9 @@ void TQWidget::setWindowState(uint newstate) TQTLWExtra *top = topData(); if ((oldstate & WindowMaximized) != (newstate & WindowMaximized)) { - if (qt_net_supports(qt_net_wm_state_max_h) && qt_net_supports(qt_net_wm_state_max_v)) { - qt_net_change_wm_state(this, (newstate & WindowMaximized), - qt_net_wm_state_max_h, qt_net_wm_state_max_v); + if (tqt_net_supports(tqt_net_wm_state_max_h) && tqt_net_supports(tqt_net_wm_state_max_v)) { + tqt_net_change_wm_state(this, (newstate & WindowMaximized), + tqt_net_wm_state_max_h, tqt_net_wm_state_max_v); } else if (! (newstate & WindowFullScreen)) { if (newstate & WindowMaximized) { // save original geometry @@ -1858,9 +1858,9 @@ void TQWidget::setWindowState(uint newstate) } if ((oldstate & WindowFullScreen) != (newstate & WindowFullScreen)) { - if (qt_net_supports(qt_net_wm_state_fullscreen)) { - qt_net_change_wm_state(this, (newstate & WindowFullScreen), - qt_net_wm_state_fullscreen); + if (tqt_net_supports(tqt_net_wm_state_fullscreen)) { + tqt_net_change_wm_state(this, (newstate & WindowFullScreen), + tqt_net_wm_state_fullscreen); } else { needShow = isVisible(); @@ -1964,7 +1964,7 @@ void TQWidget::showWindow() XFree( (char *)h ); if (tqt_x_user_time != CurrentTime) { - XChangeProperty(x11Display(), winId(), qt_net_wm_user_time, XA_CARDINAL, + XChangeProperty(x11Display(), winId(), tqt_net_wm_user_time, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &tqt_x_user_time, 1); } @@ -1977,8 +1977,8 @@ void TQWidget::showWindow() } if (isMaximized() && !isFullScreen() - && !(qt_net_supports(qt_net_wm_state_max_h) - && qt_net_supports(qt_net_wm_state_max_v))) { + && !(tqt_net_supports(tqt_net_wm_state_max_h) + && tqt_net_supports(tqt_net_wm_state_max_v))) { XMapWindow( x11Display(), winId() ); tqt_wait_for_window_manager(this); @@ -2002,7 +2002,7 @@ void TQWidget::showWindow() return; } - if (isFullScreen() && !qt_net_supports(qt_net_wm_state_fullscreen)) { + if (isFullScreen() && !tqt_net_supports(tqt_net_wm_state_fullscreen)) { XMapWindow(x11Display(), winId()); tqt_wait_for_window_manager(this); return; @@ -2162,10 +2162,10 @@ void TQWidget::internalSetGeometry( int x, int y, int w, int h, bool isMove ) if ( testWFlags(WType_Desktop) ) return; if (isTopLevel()) { - if (!qt_net_supports(qt_net_wm_state_max_h) - && !qt_net_supports(qt_net_wm_state_max_v)) + if (!tqt_net_supports(tqt_net_wm_state_max_h) + && !tqt_net_supports(tqt_net_wm_state_max_v)) clearWState(WState_Maximized); - if (!qt_net_supports(qt_net_wm_state_fullscreen)) + if (!tqt_net_supports(tqt_net_wm_state_fullscreen)) clearWState(WState_FullScreen); topData()->normalGeometry = TQRect(0, 0, -1, -1); } else { @@ -2865,10 +2865,10 @@ void TQWidget::updateFrameStrut() const XFree(data_ret); break; - } else if (qt_net_supports(qt_net_virtual_roots) && qt_net_virtual_root_list) { + } else if (tqt_net_supports(tqt_net_virtual_roots) && tqt_net_virtual_root_list) { int i = 0; - while (qt_net_virtual_root_list[i] != 0) { - if (qt_net_virtual_root_list[i++] == p) + while (tqt_net_virtual_root_list[i] != 0) { + if (tqt_net_virtual_root_list[i++] == p) break; } } |
